Back to index

python3.2  3.2.2
Static Public Attributes
test.test_argparse.TestHelpVariableExpansion Class Reference
Collaboration diagram for test.test_argparse.TestHelpVariableExpansion:
Collaboration graph

List of all members.

Static Public Attributes

tuple parser_signature = Sig(prog='PROG')
list argument_signatures
list argument_group_signatures
tuple usage
string help
string version = ''

Detailed Description

Test that variables are expanded properly in help messages

Definition at line 3487 of file

Member Data Documentation

Initial value:
        (Sig('group'), [
            Sig('-a', help='a %(prog)s %(default)s'),
            Sig('-b', default=-1, help='b %(prog)s %(default)s'),

Definition at line 3503 of file

Initial value:
        Sig('-x', type=int,
            help='x %(prog)s %(default)s %(type)s %%'),
        Sig('-y', action='store_const', default=42, const='XXX',
            help='y %(prog)s %(default)s %(const)s'),
        Sig('--foo', choices='abc',
            help='foo %(prog)s %(default)s %(choices)s'),
        Sig('--bar', default='baz', choices=[1, 2], metavar='BBB',
            help='bar %(prog)s %(default)s %(dest)s'),
        Sig('spam', help='spam %(prog)s %(default)s'),
        Sig('badger', default=0.5, help='badger %(prog)s %(default)s'),

Definition at line 3491 of file

Initial value:

    positional arguments:
      spam           spam PROG None
      badger         badger PROG 0.5

    optional arguments:
      -h, --help     show this help message and exit
      -x X           x PROG None int %
      -y             y PROG 42 XXX
      --foo {a,b,c}  foo PROG None a, b, c
      --bar BBB      bar PROG baz bar

      -a A           a PROG None
      -b B           b PROG -1

Definition at line 3513 of file

Definition at line 3490 of file

Initial value:
    usage: PROG [-h] [-x X] [-y] [--foo {a,b,c}] [--bar BBB] [-a A] [-b B]
                spam badger

Definition at line 3509 of file

Definition at line 3530 of file

The documentation for this class was generated from the following file: