MCPcopy Index your code
hub / github.com/python/cpython / test_invalid_subparsers_help

Method test_invalid_subparsers_help

Lib/test/test_argparse.py:2935–2941  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2933 self.assertIsInstance(cm.exception.__context__, context_type)
2934
2935 def test_invalid_subparsers_help(self):
2936 parser = ErrorRaisingArgumentParser(prog='PROG')
2937 self.assert_bad_help(ValueError, parser.add_subparsers, help='%Y-%m-%d')
2938 parser = ErrorRaisingArgumentParser(prog='PROG')
2939 self.assert_bad_help(KeyError, parser.add_subparsers, help='%(spam)s')
2940 parser = ErrorRaisingArgumentParser(prog='PROG')
2941 self.assert_bad_help(TypeError, parser.add_subparsers, help='%(prog)d')
2942
2943 def test_invalid_subparser_help(self):
2944 parser = ErrorRaisingArgumentParser(prog='PROG')

Callers

nothing calls this directly

Calls 2

assert_bad_helpMethod · 0.95

Tested by

no test coverage detected