summaryrefslogtreecommitdiff
path: root/Lib/test/test_argparse.py
diff options
context:
space:
mode:
authorSteven Bethard <steven.bethard@gmail.com>2011-04-04 01:47:52 +0200
committerSteven Bethard <steven.bethard@gmail.com>2011-04-04 01:47:52 +0200
commite3c11b44e37e80371fcaf71880e659a78360e8b6 (patch)
treeaf9b5ead00cfd00b6eb6fc1f839d01ec72e05168 /Lib/test/test_argparse.py
parent824504dd7ef218148db0b3c841af18f56af48ba1 (diff)
downloadcpython-git-e3c11b44e37e80371fcaf71880e659a78360e8b6.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 89a437dd40..5785eec57f 100644
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -4016,10 +4016,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")