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

Function pytest_report_header

src/_pytest/helpconfig.py:246–264  ·  view source on GitHub ↗
(config: Config)

Source from the content-addressed store, hash-verified

244
245
246def pytest_report_header(config: Config) -> List[str]:
247 lines = []
248 if config.option.debug or config.option.traceconfig:
249 lines.append(f"using: pytest-{pytest.__version__}")
250
251 verinfo = getpluginversioninfo(config)
252 if verinfo:
253 lines.extend(verinfo)
254
255 if config.option.traceconfig:
256 lines.append("active plugins:")
257 items = config.pluginmanager.list_name_plugin()
258 for name, plugin in items:
259 if hasattr(plugin, "__file__"):
260 r = plugin.__file__
261 else:
262 r = repr(plugin)
263 lines.append(f" {name:<20}: {r}")
264 return lines

Callers

nothing calls this directly

Calls 2

getpluginversioninfoFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected