MCPcopy Index your code
hub / github.com/python/cpython / test_alias_help

Method test_alias_help

Lib/test/test_argparse.py:3032–3053  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3030 '0.5 1alias3 b'.split())
3031
3032 def test_alias_help(self):
3033 parser = self._get_parser(aliases=True, subparser_help=True)
3034 self.maxDiff = None
3035 self.assertEqual(parser.format_help(), textwrap.dedent("""\
3036 usage: PROG [-h] [--foo] bar COMMAND ...
3037
3038 main description
3039
3040 positional arguments:
3041 bar bar help
3042
3043 options:
3044 -h, --help show this help message and exit
3045 --foo foo help
3046
3047 commands:
3048 COMMAND
3049 1 (1alias1, 1alias2)
3050 1 help
3051 2 2 help
3052 3 3 help
3053 """))
3054
3055# ============
3056# Groups tests

Callers

nothing calls this directly

Calls 4

_get_parserMethod · 0.95
assertEqualMethod · 0.45
format_helpMethod · 0.45
dedentMethod · 0.45

Tested by

no test coverage detected