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

Method test_drop_short_help1

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

Source from the content-addressed store, hash-verified

260
261 # testing would be more helpful with all help generated
262 def test_drop_short_help1(self, parser: parseopt.Parser) -> None:
263 group = parser.getgroup("general")
264 group.addoption("--doit", "--func-args", action="store_true", help="foo")
265 group._addoption(
266 "-h",
267 "--help",
268 action="store_true",
269 dest="help",
270 help="show help message and configuration info",
271 )
272 parser.parse(["-h"])
273 help = parser.optparser.format_help()
274 assert "-doit, --func-args foo" in help
275
276 def test_multiple_metavar_help(self, parser: parseopt.Parser) -> None:
277 """

Callers

nothing calls this directly

Calls 4

getgroupMethod · 0.80
_addoptionMethod · 0.80
addoptionMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected