MCPcopy
hub / github.com/pytest-dev/pytest / pytest_runtest_teardown

Method pytest_runtest_teardown

src/_pytest/logging.py:868–876  ·  view source on GitHub ↗
(self, item: nodes.Item)

Source from the content-addressed store, hash-verified

866
867 @hookimpl(wrapper=True)
868 def pytest_runtest_teardown(self, item: nodes.Item) -> Generator[None]:
869 self.log_cli_handler.set_when("teardown")
870
871 try:
872 with self._runtest_for(item, "teardown"):
873 yield
874 finally:
875 del item.stash[caplog_records_key]
876 del item.stash[caplog_handler_key]
877
878 @hookimpl
879 def pytest_runtest_logfinish(self) -> None:

Callers

nothing calls this directly

Calls 2

_runtest_forMethod · 0.95
set_whenMethod · 0.45

Tested by

no test coverage detected