@@ -5381,6 +5381,7 @@ class TestHelpArgumentDefaults(HelpTestCase):
53815381 argument_signatures = [
53825382 Sig ('--foo' , help = 'foo help - oh and by the way, %(default)s' ),
53835383 Sig ('--bar' , action = 'store_true' , help = 'bar help' ),
5384+ Sig ('--required' , required = True , help = 'some help' ),
53845385 Sig ('--taz' , action = argparse .BooleanOptionalAction ,
53855386 help = 'Whether to taz it' , default = True ),
53865387 Sig ('--corge' , action = argparse .BooleanOptionalAction ,
@@ -5394,8 +5395,8 @@ class TestHelpArgumentDefaults(HelpTestCase):
53945395 [Sig ('--baz' , type = int , default = 42 , help = 'baz help' )]),
53955396 ]
53965397 usage = '''\
5397- usage: PROG [-h] [--foo FOO] [--bar] [--taz | --no- taz] [--corge | --no-corge ]
5398- [--quux QUUX] [--baz BAZ]
5398+ usage: PROG [-h] [--foo FOO] [--bar] --required REQUIRED [-- taz | --no-taz ]
5399+ [--corge | --no-corge] [-- quux QUUX] [--baz BAZ]
53995400 spam [badger]
54005401 '''
54015402 help = usage + '''\
@@ -5410,6 +5411,7 @@ class TestHelpArgumentDefaults(HelpTestCase):
54105411 -h, --help show this help message and exit
54115412 --foo FOO foo help - oh and by the way, None
54125413 --bar bar help (default: False)
5414+ --required REQUIRED some help
54135415 --taz, --no-taz Whether to taz it (default: True)
54145416 --corge, --no-corge Whether to corge it
54155417 --quux QUUX Set the quux (default: 42)
0 commit comments