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

Method test_parser_addoption

testing/test_parseopt.py:113–117  ·  view source on GitHub ↗
(self, parser: parseopt.Parser)

Source from the content-addressed store, hash-verified

111 assert len(group.options) == 1
112
113 def test_parser_addoption(self, parser: parseopt.Parser) -> None:
114 group = parser.getgroup("custom options")
115 assert len(group.options) == 0
116 group.addoption("--option1", action="store_true")
117 assert len(group.options) == 1
118
119 def test_parse(self, parser: parseopt.Parser) -> None:
120 parser.addoption("--hello", dest="hello", action="store")

Callers

nothing calls this directly

Calls 2

getgroupMethod · 0.80
addoptionMethod · 0.45

Tested by

no test coverage detected