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

Method test_group_shortopt_lowercase

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

Source from the content-addressed store, hash-verified

103 assert str({"--option1"}) in str(err.value)
104
105 def test_group_shortopt_lowercase(self, parser: parseopt.Parser) -> None:
106 group = parser.getgroup("hello")
107 with pytest.raises(ValueError):
108 group.addoption("-x", action="store_true")
109 assert len(group.options) == 0
110 group._addoption("-x", action="store_true")
111 assert len(group.options) == 1
112
113 def test_parser_addoption(self, parser: parseopt.Parser) -> None:
114 group = parser.getgroup("custom options")

Callers

nothing calls this directly

Calls 3

getgroupMethod · 0.80
_addoptionMethod · 0.80
addoptionMethod · 0.45

Tested by

no test coverage detected