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

Function pytest_addoption

src/_pytest/capture.py:49–65  ·  view source on GitHub ↗
(parser: Parser)

Source from the content-addressed store, hash-verified

47
48
49def pytest_addoption(parser: Parser) -> None:
50 group = parser.getgroup("general")
51 group.addoption(
52 "--capture",
53 action="store",
54 default="fd",
55 metavar="method",
56 choices=["fd", "sys", "no", "tee-sys"],
57 help="Per-test capturing method: one of fd|sys|no|tee-sys",
58 )
59 group._addoption( # private to use reserved lower-case short option
60 "-s",
61 action="store_const",
62 const="no",
63 dest="capture",
64 help="Shortcut for --capture=no",
65 )
66
67
68def _colorama_workaround() -> None:

Callers

nothing calls this directly

Calls 3

getgroupMethod · 0.80
_addoptionMethod · 0.80
addoptionMethod · 0.45

Tested by

no test coverage detected