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

Method get_parser

Lib/test/test_argparse.py:3528–3535  ·  view source on GitHub ↗
(self, required=None)

Source from the content-addressed store, hash-verified

3526class TestMutuallyExclusiveLong(MEMixin, TestCase):
3527
3528 def get_parser(self, required=None):
3529 parser = ErrorRaisingArgumentParser(prog='PROG')
3530 parser.add_argument('--abcde', help='abcde help')
3531 parser.add_argument('--fghij', help='fghij help')
3532 group = parser.add_mutually_exclusive_group(required=required)
3533 group.add_argument('--klmno', help='klmno help')
3534 group.add_argument('--pqrst', help='pqrst help')
3535 return parser
3536
3537 failures = ['--klmno X --pqrst Y']
3538 successes = [

Callers

nothing calls this directly

Calls 3

add_argumentMethod · 0.45

Tested by

no test coverage detected