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

Method test_parse_will_set_default

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

Source from the content-addressed store, hash-verified

143 assert unknown == ["--y", "this"]
144
145 def test_parse_will_set_default(self, parser: parseopt.Parser) -> None:
146 parser.addoption("--hello", dest="hello", default="x", action="store")
147 option = parser.parse([])
148 assert option.hello == "x"
149 del option.hello
150 parser.parse_setoption([], option)
151 assert option.hello == "x"
152
153 def test_parse_setoption(self, parser: parseopt.Parser) -> None:
154 parser.addoption("--hello", dest="hello", action="store")

Callers

nothing calls this directly

Calls 3

parse_setoptionMethod · 0.80
addoptionMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected