MCPcopy Create free account
hub / github.com/pytest-dev/pytest / set_when

Method set_when

src/_pytest/logging.py:789–794  ·  view source on GitHub ↗

Prepare for the given test phase (setup/call/teardown).

(self, when: Optional[str])

Source from the content-addressed store, hash-verified

787 self._first_record_emitted = False
788
789 def set_when(self, when: Optional[str]) -> None:
790 """Prepare for the given test phase (setup/call/teardown)."""
791 self._when = when
792 self._section_name_shown = False
793 if when == "start":
794 self._test_outcome_written = False
795
796 def emit(self, record: logging.LogRecord) -> None:
797 ctx_manager = (

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected