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

Method pytest_runtestloop

src/_pytest/logging.py:671–682  ·  view source on GitHub ↗
(self, session: Session)

Source from the content-addressed store, hash-verified

669
670 @hookimpl(hookwrapper=True)
671 def pytest_runtestloop(self, session: Session) -> Generator[None, None, None]:
672 if session.config.option.collectonly:
673 yield
674 return
675
676 if self._log_cli_enabled() and self._config.getoption("verbose") < 1:
677 # The verbose flag is needed to avoid messy test progress output.
678 self._config.option.verbose = 1
679
680 with catching_logs(self.log_cli_handler, level=self.log_cli_level):
681 with catching_logs(self.log_file_handler, level=self.log_file_level):
682 yield # Run all the tests.
683
684 @hookimpl
685 def pytest_runtest_logstart(self) -> None:

Callers 1

_mainFunction · 0.80

Calls 3

_log_cli_enabledMethod · 0.95
catching_logsClass · 0.85
getoptionMethod · 0.45

Tested by

no test coverage detected