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

Method test_drop_short_0

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

Source from the content-addressed store, hash-verified

235 assert "|".join(args.files_and_dirs) == "file|dir"
236
237 def test_drop_short_0(self, parser: parseopt.Parser) -> None:
238 parser.addoption("--funcarg", "--func-arg", action="store_true")
239 parser.addoption("--abc-def", "--abc-def", action="store_true")
240 parser.addoption("--klm-hij", action="store_true")
241 with pytest.raises(UsageError):
242 parser.parse(["--funcarg", "--k"])
243
244 def test_drop_short_2(self, parser: parseopt.Parser) -> None:
245 parser.addoption("--func-arg", "--doit", action="store_true")

Callers

nothing calls this directly

Calls 2

addoptionMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected