(self)
| 6573 | self.assertEqual(bar.required, True) |
| 6574 | |
| 6575 | def test_remainder(self): |
| 6576 | # Intermixed and remainder are incompatible |
| 6577 | parser = ErrorRaisingArgumentParser(prog='PROG') |
| 6578 | parser.add_argument('-z') |
| 6579 | parser.add_argument('x') |
| 6580 | parser.add_argument('y', nargs='...') |
| 6581 | argv = 'X A B -z Z'.split() |
| 6582 | # intermixed fails with '...' (also 'A...') |
| 6583 | # self.assertRaises(TypeError, parser.parse_intermixed_args, argv) |
| 6584 | with self.assertRaises(TypeError) as cm: |
| 6585 | parser.parse_intermixed_args(argv) |
| 6586 | self.assertRegex(str(cm.exception), r'\.\.\.') |
| 6587 | |
| 6588 | def test_required_exclusive(self): |
| 6589 | # required mutually exclusive group; intermixed works fine |
nothing calls this directly
no test coverage detected