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

Method test_group_addoption_conflict

testing/test_parseopt.py:98–103  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

96 assert isinstance(group.options[0], parseopt.Argument)
97
98 def test_group_addoption_conflict(self) -> None:
99 group = parseopt.OptionGroup("hello again", _ispytest=True)
100 group.addoption("--option1", "--option-1", action="store_true")
101 with pytest.raises(ValueError) as err:
102 group.addoption("--option1", "--option-one", action="store_true")
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")

Callers

nothing calls this directly

Calls 1

addoptionMethod · 0.95

Tested by

no test coverage detected