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

Function pytest_addoption

src/_pytest/runner.py:51–69  ·  view source on GitHub ↗
(parser: Parser)

Source from the content-addressed store, hash-verified

49
50
51def pytest_addoption(parser: Parser) -> None:
52 group = parser.getgroup("terminal reporting", "Reporting", after="general")
53 group.addoption(
54 "--durations",
55 action="store",
56 type=int,
57 default=None,
58 metavar="N",
59 help="Show N slowest setup/test durations (N=0 for all)",
60 )
61 group.addoption(
62 "--durations-min",
63 action="store",
64 type=float,
65 default=None,
66 metavar="N",
67 help="Minimal duration in seconds for inclusion in slowest list. "
68 "Default: 0.005 (or 0.0 if -vv is given).",
69 )
70
71
72def pytest_terminal_summary(terminalreporter: TerminalReporter) -> None:

Callers

nothing calls this directly

Calls 2

getgroupMethod · 0.80
addoptionMethod · 0.45

Tested by

no test coverage detected