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

Method pytest_report_header

src/_pytest/terminal.py:883–903  ·  view source on GitHub ↗
(self, config: Config)

Source from the content-addressed store, hash-verified

881 self.write_line(line)
882
883 def pytest_report_header(self, config: Config) -> list[str]:
884 result = [f"rootdir: {config.rootpath}"]
885
886 if config.inipath:
887 warning = ""
888 if config._ignored_config_files:
889 warning = f" (WARNING: ignoring pytest config in {', '.join(config._ignored_config_files)}!)"
890 result.append(
891 "configfile: " + bestrelpath(config.rootpath, config.inipath) + warning
892 )
893
894 if config.args_source == Config.ArgsSource.TESTPATHS:
895 testpaths: list[str] = config.getini("testpaths")
896 result.append("testpaths: {}".format(", ".join(testpaths)))
897
898 plugininfo = config.pluginmanager.list_plugin_distinfo()
899 if plugininfo:
900 result.append(
901 "plugins: {}".format(", ".join(_plugin_nameversions(plugininfo)))
902 )
903 return result
904
905 def pytest_collection_finish(self, session: Session) -> None:
906 self.report_collect(True)

Callers 1

pytest_sessionstartMethod · 0.80

Calls 6

bestrelpathFunction · 0.90
_plugin_nameversionsFunction · 0.85
joinMethod · 0.80
appendMethod · 0.80
getiniMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected