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

Function pytest_report_header

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

Source from the content-addressed store, hash-verified

273
274
275def pytest_report_header(config: Config) -> list[str]:
276 lines = []
277 if config.option.debug or config.option.traceconfig:
278 lines.append(f"using: pytest-{pytest.__version__}")
279
280 verinfo = getpluginversioninfo(config)
281 if verinfo:
282 lines.extend(verinfo)
283
284 if config.option.traceconfig:
285 lines.append("active plugins:")
286 items = config.pluginmanager.list_name_plugin()
287 for name, plugin in items:
288 if hasattr(plugin, "__file__"):
289 r = plugin.__file__
290 else:
291 r = repr(plugin)
292 lines.append(f" {name:<20}: {r}")
293 return lines

Callers

nothing calls this directly

Calls 2

getpluginversioninfoFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected