Get the logging records for one of the possible test phases. :param str when: Which test phase to obtain the records from. Valid values are: "setup", "call" and "teardown". :returns: The list of captured records at the given stage. :rtype: List[logging.LogRecord
(self, when: str)
| 382 | return self._item.stash[caplog_handler_key] |
| 383 | |
| 384 | def get_records(self, when: str) -> List[logging.LogRecord]: |
| 385 | """Get the logging records for one of the possible test phases. |
| 386 | |
| 387 | :param str when: |
| 388 | Which test phase to obtain the records from. Valid values are: "setup", "call" and "teardown". |
| 389 | |
| 390 | :returns: The list of captured records at the given stage. |
| 391 | :rtype: List[logging.LogRecord] |
| 392 | |
| 393 | .. versionadded:: 3.4 |
| 394 | """ |
| 395 | return self._item.stash[caplog_records_key].get(when, []) |
| 396 | |
| 397 | @property |
| 398 | def text(self) -> str: |