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

Function pytest_addoption

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

Source from the content-addressed store, hash-verified

48
49
50def pytest_addoption(parser: Parser) -> None:
51 group = parser.getgroup("terminal reporting", "reporting", after="general")
52 group.addoption(
53 "--durations",
54 action="store",
55 type=int,
56 default=None,
57 metavar="N",
58 help="show N slowest setup/test durations (N=0 for all).",
59 )
60 group.addoption(
61 "--durations-min",
62 action="store",
63 type=float,
64 default=0.005,
65 metavar="N",
66 help="Minimal duration in seconds for inclusion in slowest list. Default 0.005",
67 )
68
69
70def 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