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

Method test_failures_when_not_required

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

Source from the content-addressed store, hash-verified

3435class MEMixin(object):
3436
3437 def test_failures_when_not_required(self):
3438 parse_args = self.get_parser(required=False).parse_args
3439 error = ArgumentParserError
3440 for args_string in self.failures:
3441 with self.subTest(args=args_string):
3442 self.assertRaises(error, parse_args, args_string.split())
3443
3444 def test_failures_when_required(self):
3445 parse_args = self.get_parser(required=True).parse_args

Callers

nothing calls this directly

Calls 4

get_parserMethod · 0.45
subTestMethod · 0.45
assertRaisesMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected