summaryrefslogtreecommitdiff
path: root/Lib/test/test_argparse.py
diff options
context:
space:
mode:
authorSteven Bethard <steven.bethard@gmail.com>2011-04-04 02:10:40 +0200
committerSteven Bethard <steven.bethard@gmail.com>2011-04-04 02:10:40 +0200
commit7c8ea37d9bc66db3e6ea0b6a90c3f8b3deafaac1 (patch)
tree2527a6043a85daff4ec4cec4e41c65547c00b73a /Lib/test/test_argparse.py
parentfc2e3763c81ab6a2b25308046bc42bab12afeb69 (diff)
parent7cb20a8605d79faae64cccf8bbe8418b492f0e30 (diff)
downloadcpython-git-7c8ea37d9bc66db3e6ea0b6a90c3f8b3deafaac1.tar.gz
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.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py
index 6ca1019c9a..2836e7ec94 100644
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -4082,10 +4082,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")