@@ -2163,7 +2163,7 @@ def test_subparser1_help(self):
21632163
21642164 def test_subparser2_help (self ):
21652165 self ._test_subparser_help ('5.0 2 -h' , textwrap .dedent ('''\
2166- usage: PROG bar 2 [-h] [-y {1,2,3}] [z [z ...] ]
2166+ usage: PROG bar 2 [-h] [-y {1,2,3}] [z ...]
21672167
21682168 2 description
21692169
@@ -2697,10 +2697,10 @@ def get_parser(self, required):
26972697 ]
26982698
26992699 usage_when_not_required = '''\
2700- usage: PROG [-h] [--foo | --spam SPAM | badger [badger ...] ]
2700+ usage: PROG [-h] [--foo | --spam SPAM | badger ...]
27012701 '''
27022702 usage_when_required = '''\
2703- usage: PROG [-h] (--foo | --spam SPAM | badger [badger ...] )
2703+ usage: PROG [-h] (--foo | --spam SPAM | badger ...)
27042704 '''
27052705 help = '''\
27062706
@@ -3494,11 +3494,11 @@ class TestHelpUsage(HelpTestCase):
34943494 ])
34953495 ]
34963496 usage = '''\
3497- usage: PROG [-h] [-w W [W ...]] [-x [X [X ...] ]] [--foo | --no-foo]
3497+ usage: PROG [-h] [-w W [W ...]] [-x [X ...]] [--foo | --no-foo]
34983498 [--bar | --no-bar]
34993499 [-f | --foobar | --no-foobar | --barfoo | --no-barfoo] [-y [Y]]
35003500 [-z Z Z Z]
3501- a b b [c] [d [d ...] ] e [e ...]
3501+ a b b [c] [d ...] e [e ...]
35023502 '''
35033503 help = usage + '''\
35043504
@@ -3510,7 +3510,7 @@ class TestHelpUsage(HelpTestCase):
35103510 optional arguments:
35113511 -h, --help show this help message and exit
35123512 -w W [W ...] w
3513- -x [X [X ...]] x
3513+ -x [X ...] x
35143514 --foo, --no-foo Whether to foo
35153515 --bar, --no-bar Whether to bar (default: True)
35163516 -f, --foobar, --no-foobar, --barfoo, --no-barfoo
@@ -5113,7 +5113,7 @@ def test_nargs_zeroormore_metavar_length0(self):
51135113 self .do_test_exception (nargs = "*" , metavar = tuple ())
51145114
51155115 def test_nargs_zeroormore_metavar_length1 (self ):
5116- self .do_test_exception (nargs = "*" , metavar = ("1" ,))
5116+ self .do_test_no_exception (nargs = "*" , metavar = ("1" ,))
51175117
51185118 def test_nargs_zeroormore_metavar_length2 (self ):
51195119 self .do_test_no_exception (nargs = "*" , metavar = ("1" , "2" ))
0 commit comments