'''
version = ''
+ class TestHelpSubparsersOrdering(HelpTestCase):
+ """Test ordering of subcommands in help matches the code"""
+ parser_signature = Sig(prog='PROG',
+ description='display some subcommands',
+ version='0.1')
+
+ subparsers_signatures = [Sig(name=name)
+ for name in ('a', 'b', 'c', 'd', 'e')]
+
+ usage = '''\
+ usage: PROG [-h] [-v] {a,b,c,d,e} ...
+ '''
+
+ help = usage + '''\
+
+ display some subcommands
+
+ positional arguments:
+ {a,b,c,d,e}
+
+ optional arguments:
+ -h, --help show this help message and exit
+ -v, --version show program's version number and exit
+ '''
+
+ version = '''\
+ 0.1
+ '''
+
+ class TestHelpSubparsersWithHelpOrdering(HelpTestCase):
+ """Test ordering of subcommands in help matches the code"""
+ parser_signature = Sig(prog='PROG',
+ description='display some subcommands',
+ version='0.1')
+
+ subcommand_data = (('a', 'a subcommand help'),
+ ('b', 'b subcommand help'),
+ ('c', 'c subcommand help'),
+ ('d', 'd subcommand help'),
+ ('e', 'e subcommand help'),
+ )
+
+ subparsers_signatures = [Sig(name=name, help=help)
+ for name, help in subcommand_data]
+
+ usage = '''\
+ usage: PROG [-h] [-v] {a,b,c,d,e} ...
+ '''
+
+ help = usage + '''\
+
+ display some subcommands
+
+ positional arguments:
+ {a,b,c,d,e}
+ a a subcommand help
+ b b subcommand help
+ c c subcommand help
+ d d subcommand help
+ e e subcommand help
+
+ optional arguments:
+ -h, --help show this help message and exit
+ -v, --version show program's version number and exit
+ '''
+
+ version = '''\
+ 0.1
+ '''
+
+
+
+class TestHelpMetavarTypeFormatter(HelpTestCase):
+ """"""
+
+ def custom_type(string):
+ return string
+
+ parser_signature = Sig(prog='PROG', description='description',
+ formatter_class=argparse.MetavarTypeHelpFormatter)
+ argument_signatures = [Sig('a', type=int),
+ Sig('-b', type=custom_type),
+ Sig('-c', type=float, metavar='SOME FLOAT')]
+ argument_group_signatures = []
+ usage = '''\
+ usage: PROG [-h] [-b custom_type] [-c SOME FLOAT] int
+ '''
+ help = usage + '''\
+
+ description
+
+ positional arguments:
+ int
+
+ optional arguments:
+ -h, --help show this help message and exit
+ -b custom_type
+ -c SOME FLOAT
+ '''
+ version = ''
+
+
# =====================================
# Optional/Positional constructor tests
# =====================================