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

Function pytest_addoption

src/_pytest/debugging.py:43–64  ·  view source on GitHub ↗
(parser: Parser)

Source from the content-addressed store, hash-verified

41
42
43def pytest_addoption(parser: Parser) -> None:
44 group = parser.getgroup("general")
45 group._addoption(
46 "--pdb",
47 dest="usepdb",
48 action="store_true",
49 help="start the interactive Python debugger on errors or KeyboardInterrupt.",
50 )
51 group._addoption(
52 "--pdbcls",
53 dest="usepdb_cls",
54 metavar="modulename:classname",
55 type=_validate_usepdb_cls,
56 help="specify a custom interactive Python debugger for use with --pdb."
57 "For example: --pdbcls=IPython.terminal.debugger:TerminalPdb",
58 )
59 group._addoption(
60 "--trace",
61 dest="trace",
62 action="store_true",
63 help="Immediately break when running each test.",
64 )
65
66
67def pytest_configure(config: Config) -> None:

Callers

nothing calls this directly

Calls 2

getgroupMethod · 0.80
_addoptionMethod · 0.80

Tested by

no test coverage detected