diff options
author | Steven Bethard <steven.bethard@gmail.com> | 2011-04-03 23:53:02 (GMT) |
---|---|---|
committer | Steven Bethard <steven.bethard@gmail.com> | 2011-04-03 23:53:02 (GMT) |
commit | 7cb20a8605d79faae64cccf8bbe8418b492f0e30 (patch) | |
tree | 5beb0a6acd7f161467c5c905f77c4117e801148c /Lib/test/test_argparse.py | |
parent | 43bf045be09f50c17627bfa3dd2ce386ddf37304 (diff) | |
download | cpython-7cb20a8605d79faae64cccf8bbe8418b492f0e30.zip cpython-7cb20a8605d79faae64cccf8bbe8418b492f0e30.tar.gz cpython-7cb20a8605d79faae64cccf8bbe8418b492f0e30.tar.bz2 |
Issue #9347: Fix formatting for tuples in argparse type= error messages.
Diffstat (limited to 'Lib/test/test_argparse.py')
-rw-r--r-- | Lib/test/test_argparse.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py index e187653..5ecfdc7 100644 --- a/Lib/test/test_argparse.py +++ b/Lib/test/test_argparse.py @@ -4051,10 +4051,12 @@ class TestInvalidArgumentConstructors(TestCase): def test_invalid_type(self): self.assertValueError('--foo', type='int') + self.assertValueError('--foo', type=(int, float)) def test_invalid_action(self): self.assertValueError('-x', action='foo') self.assertValueError('foo', action='baz') + self.assertValueError('--foo', action=('store', 'append')) parser = argparse.ArgumentParser() try: parser.add_argument("--foo", action="store-true") |