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

Method defaultget

testing/test_parseopt.py:183–189  ·  view source on GitHub ↗
(option)

Source from the content-addressed store, hash-verified

181
182 def test_parse_defaultgetter(self) -> None:
183 def defaultget(option):
184 if not hasattr(option, "type"):
185 return
186 if option.type is int:
187 option.default = 42
188 elif option.type is str:
189 option.default = "world"
190
191 parser = parseopt.Parser(processopt=defaultget, _ispytest=True)
192 parser.addoption("--this", dest="this", type=int, action="store")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected