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

Method test_parse

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

Source from the content-addressed store, hash-verified

117 assert len(group.options) == 1
118
119 def test_parse(self, parser: parseopt.Parser) -> None:
120 parser.addoption("--hello", dest="hello", action="store")
121 args = parser.parse(["--hello", "world"])
122 assert args.hello == "world"
123 assert not getattr(args, parseopt.FILE_OR_DIR)
124
125 def test_parse2(self, parser: parseopt.Parser) -> None:
126 args = parser.parse([Path(".")])

Callers

nothing calls this directly

Calls 2

addoptionMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected