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

Method test_no_help_by_default

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

Source from the content-addressed store, hash-verified

19
20class TestParser:
21 def test_no_help_by_default(self) -> None:
22 parser = parseopt.Parser(usage="xyz", _ispytest=True)
23 pytest.raises(UsageError, lambda: parser.parse(["-h"]))
24
25 def test_custom_prog(self, parser: parseopt.Parser) -> None:
26 """Custom prog can be set for `argparse.ArgumentParser`."""

Callers

nothing calls this directly

Calls 1

parseMethod · 0.95

Tested by

no test coverage detected