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

Method test_successes_when_required

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

Source from the content-addressed store, hash-verified

3457 self.assertEqual(actual_ns, expected_ns)
3458
3459 def test_successes_when_required(self):
3460 parse_args = self.get_parser(required=True).parse_args
3461 for args_string, expected_ns in self.successes:
3462 with self.subTest(args=args_string):
3463 actual_ns = parse_args(args_string.split())
3464 self.assertEqual(actual_ns, expected_ns)
3465
3466 @force_not_colorized
3467 def test_usage_when_not_required(self):

Callers

nothing calls this directly

Calls 5

parse_argsFunction · 0.70
get_parserMethod · 0.45
subTestMethod · 0.45
splitMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected