MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_failures_when_required

Method test_failures_when_required

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

Source from the content-addressed store, hash-verified

3331 self.assertRaises(error, parse_args, args_string.split())
3332
3333 def test_failures_when_required(self):
3334 parse_args = self.get_parser(required=True).parse_args
3335 error = ArgumentParserError
3336 for args_string in self.failures + ['']:
3337 with self.subTest(args=args_string):
3338 self.assertRaises(error, parse_args, args_string.split())
3339
3340 def test_successes_when_not_required(self):
3341 parse_args = self.get_parser(required=False).parse_args

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected