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

Method test_failures_when_not_required

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

Source from the content-addressed store, hash-verified

3324class MEMixin(object):
3325
3326 def test_failures_when_not_required(self):
3327 parse_args = self.get_parser(required=False).parse_args
3328 error = ArgumentParserError
3329 for args_string in self.failures:
3330 with self.subTest(args=args_string):
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

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