mirror of
https://github.com/python/cpython
synced 2024-09-22 17:23:46 +00:00
Merge with 3.2
This commit is contained in:
commit
8d172343ad
|
@ -2170,8 +2170,9 @@ def test_parent_help(self):
|
|||
parents = [self.abcd_parent, self.wxyz_parent]
|
||||
parser = ErrorRaisingArgumentParser(parents=parents)
|
||||
parser_help = parser.format_help()
|
||||
progname = self.main_program
|
||||
self.assertEqual(parser_help, textwrap.dedent('''\
|
||||
usage: {} [-h] [-b B] [--d D] [--w W] [-y Y] a z
|
||||
usage: {}{}[-h] [-b B] [--d D] [--w W] [-y Y] a z
|
||||
|
||||
positional arguments:
|
||||
a
|
||||
|
@ -2187,7 +2188,7 @@ def test_parent_help(self):
|
|||
|
||||
x:
|
||||
-y Y
|
||||
'''.format(self.main_program)))
|
||||
'''.format(progname, ' ' if progname else '' )))
|
||||
|
||||
def test_groups_parents(self):
|
||||
parent = ErrorRaisingArgumentParser(add_help=False)
|
||||
|
@ -2203,8 +2204,9 @@ def test_groups_parents(self):
|
|||
['-y', 'Y', '-z', 'Z'])
|
||||
|
||||
parser_help = parser.format_help()
|
||||
progname = self.main_program
|
||||
self.assertEqual(parser_help, textwrap.dedent('''\
|
||||
usage: {} [-h] [-w W] [-x X] [-y Y | -z Z]
|
||||
usage: {}{}[-h] [-w W] [-x X] [-y Y | -z Z]
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
|
@ -2216,7 +2218,7 @@ def test_groups_parents(self):
|
|||
|
||||
-w W
|
||||
-x X
|
||||
'''.format(self.main_program)))
|
||||
'''.format(progname, ' ' if progname else '' )))
|
||||
|
||||
# ==============================
|
||||
# Mutually exclusive group tests
|
||||
|
|
Loading…
Reference in a new issue