(self)
| 811 | ] |
| 812 | |
| 813 | def test_const(self): |
| 814 | # See bpo-40862 |
| 815 | parser = argparse.ArgumentParser() |
| 816 | with self.assertRaises(TypeError) as cm: |
| 817 | parser.add_argument('--foo', const=True, action=argparse.BooleanOptionalAction) |
| 818 | |
| 819 | self.assertIn("got an unexpected keyword argument 'const'", str(cm.exception)) |
| 820 | |
| 821 | def test_invalid_name(self): |
| 822 | parser = argparse.ArgumentParser() |
nothing calls this directly
no test coverage detected