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

Method test_parse

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

Source from the content-addressed store, hash-verified

124 assert len(group.options) == 1
125
126 def test_parse(self, parser: parseopt.Parser) -> None:
127 parser.addoption("--hello", dest="hello", action="store")
128 args = parser.parse(["--hello", "world"])
129 assert args.hello == "world"
130 assert not getattr(args, parseopt.FILE_OR_DIR)
131
132 def test_parse2(self, parser: parseopt.Parser) -> None:
133 args = parser.parse([Path(".")])

Callers

nothing calls this directly

Calls 2

addoptionMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected