diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_argparse.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_argparse.py b/test/test_argparse.py index 968843c..4392e42 100644 --- a/test/test_argparse.py +++ b/test/test_argparse.py @@ -3300,7 +3300,7 @@ class TestHelpVariableExpansion(HelpTestCase): parser_signature = Sig(prog='PROG') argument_signatures = [ - Sig('-x', type='int', + Sig('-x', type=int, help='x %(prog)s %(default)s %(type)s %%'), Sig('-y', action='store_const', default=42, const='XXX', help='y %(prog)s %(default)s %(const)s'), @@ -3770,6 +3770,9 @@ class TestInvalidArgumentConstructors(TestCase): self.assertValueError('--') self.assertValueError('---') + def test_invalid_type(self): + self.assertValueError('--foo', type='int') + def test_invalid_action(self): self.assertValueError('-x', action='foo') self.assertValueError('foo', action='baz') |