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

Method pytest_collection_finish

src/_pytest/terminal.py:905–925  ·  view source on GitHub ↗
(self, session: Session)

Source from the content-addressed store, hash-verified

903 return result
904
905 def pytest_collection_finish(self, session: Session) -> None:
906 self.report_collect(True)
907
908 lines = self.config.hook.pytest_report_collectionfinish(
909 config=self.config,
910 start_path=self.startpath,
911 items=session.items,
912 )
913 self._write_report_lines_from_hooks(lines)
914
915 if self.config.getoption("collectonly"):
916 if session.items:
917 if self.config.option.verbose > -1:
918 self._tw.line("")
919 self._printcollecteditems(session.items)
920
921 failed = self.stats.get("failed")
922 if failed:
923 self._tw.sep("!", "collection failures")
924 for rep in failed:
925 rep.toterminal(self._tw)
926
927 def _printcollecteditems(self, items: Sequence[Item]) -> None:
928 test_cases_verbosity = self.config.get_verbosity(Config.VERBOSITY_TEST_CASES)

Callers

nothing calls this directly

Calls 9

report_collectMethod · 0.95
_printcollecteditemsMethod · 0.95
getoptionMethod · 0.80
lineMethod · 0.45
getMethod · 0.45
sepMethod · 0.45
toterminalMethod · 0.45

Tested by

no test coverage detected