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

Method test_parse_special_destination

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

Source from the content-addressed store, hash-verified

176 assert getattr(option, parseopt.FILE_OR_DIR) == []
177
178 def test_parse_special_destination(self, parser: parseopt.Parser) -> None:
179 parser.addoption("--ultimate-answer", type=int)
180 args = parser.parse(["--ultimate-answer", "42"])
181 assert args.ultimate_answer == 42
182
183 def test_parse_split_positional_arguments(self, parser: parseopt.Parser) -> None:
184 parser.addoption("-R", action="store_true")

Callers

nothing calls this directly

Calls 2

addoptionMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected