summaryrefslogtreecommitdiff
path: root/Lib/test/test_argparse.py
diff options
context:
space:
mode:
authorSteven Bethard <steven.bethard@gmail.com>2010-05-24 03:47:38 +0000
committerSteven Bethard <steven.bethard@gmail.com>2010-05-24 03:47:38 +0000
commit51e60a33b59839afab3b4ce7b1f34bd35ce3cf34 (patch)
tree5898d426e20764022b14f5665d20245ad126e043 /Lib/test/test_argparse.py
parent1e08dc25d4d065431d574795b7e8ffff4b57773c (diff)
downloadcpython-51e60a33b59839afab3b4ce7b1f34bd35ce3cf34.tar.gz
Merged revisions 81492 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81492 | steven.bethard | 2010-05-23 20:45:26 -0700 (Sun, 23 May 2010) | 1 line Fix default value for version help. Approved by Benjamin on python-dev: http://mail.python.org/pipermail/python-dev/2010-May/100231.html ........
Diffstat (limited to 'Lib/test/test_argparse.py')
-rw-r--r--Lib/test/test_argparse.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py
index f13c622267..94cd3d3947 100644
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -3688,6 +3688,25 @@ class TestHelpArgumentDefaults(HelpTestCase):
'''
version = ''
+class TestHelpVersionAction(HelpTestCase):
+ """Test the default help for the version action"""
+
+ parser_signature = Sig(prog='PROG', description='description')
+ argument_signatures = [Sig('-V', '--version', action='version', version='3.6')]
+ argument_group_signatures = []
+ usage = '''\
+ usage: PROG [-h] [-V]
+ '''
+ help = usage + '''\
+
+ description
+
+ optional arguments:
+ -h, --help show this help message and exit
+ -V, --version show program's version number and exit
+ '''
+ version = ''
+
# =====================================
# Optional/Positional constructor tests
# =====================================