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

Method pytest_runtestloop

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

Source from the content-addressed store, hash-verified

804
805 @hookimpl(wrapper=True)
806 def pytest_runtestloop(self, session: Session) -> Generator[None, object, object]:
807 if session.config.option.collectonly:
808 return (yield)
809
810 if self._log_cli_enabled() and self._config.get_verbosity() < 1:
811 # The verbose flag is needed to avoid messy test progress output.
812 self._config.option.verbose = 1
813
814 with catching_logs(self.log_cli_handler, level=self.log_cli_level):
815 with catching_logs(self.log_file_handler, level=self.log_file_level):
816 return (yield) # Run all the tests.
817
818 @hookimpl
819 def pytest_runtest_logstart(self) -> None:

Callers 1

_mainFunction · 0.45

Calls 3

_log_cli_enabledMethod · 0.95
catching_logsClass · 0.85
get_verbosityMethod · 0.45

Tested by

no test coverage detected