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

Method pytest_runtest_setup

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

Source from the content-addressed store, hash-verified

850
851 @hookimpl(wrapper=True)
852 def pytest_runtest_setup(self, item: nodes.Item) -> Generator[None]:
853 self.log_cli_handler.set_when("setup")
854
855 empty: dict[str, list[logging.LogRecord]] = {}
856 item.stash[caplog_records_key] = empty
857 with self._runtest_for(item, "setup"):
858 yield
859
860 @hookimpl(wrapper=True)
861 def pytest_runtest_call(self, item: nodes.Item) -> Generator[None]:

Callers 1

test_pyfunc_callMethod · 0.45

Calls 2

_runtest_forMethod · 0.95
set_whenMethod · 0.45

Tested by 1

test_pyfunc_callMethod · 0.36