(self)
| 819 | self.assertIn("got an unexpected keyword argument 'const'", str(cm.exception)) |
| 820 | |
| 821 | def test_invalid_name(self): |
| 822 | parser = argparse.ArgumentParser() |
| 823 | with self.assertRaises(ValueError) as cm: |
| 824 | parser.add_argument('--no-foo', action=argparse.BooleanOptionalAction) |
| 825 | self.assertEqual(str(cm.exception), |
| 826 | "invalid option name '--no-foo' for BooleanOptionalAction") |
| 827 | |
| 828 | class TestBooleanOptionalActionSingleDash(ParserTestCase): |
| 829 | """Tests BooleanOptionalAction with single dash""" |
nothing calls this directly
no test coverage detected