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

Method test_successes

Lib/test/test_argparse.py:322–329  ·  view source on GitHub ↗
(self, tester)

Source from the content-addressed store, hash-verified

320 parser.parse_args(args)
321
322 def test_successes(self, tester):
323 parser = self._get_parser(tester)
324 for args, expected_ns in tester.successes:
325 if isinstance(args, str):
326 args = args.split()
327 with tester.subTest(args=args):
328 result_ns = self._parse_args(parser, args)
329 tester.assertEqual(expected_ns, result_ns)
330
331 # add tests for each combination of an optionals adding method
332 # and an arg parsing method

Callers

nothing calls this directly

Calls 4

_get_parserMethod · 0.95
splitMethod · 0.45
subTestMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected