MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_alias_help

Method test_alias_help

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

Source from the content-addressed store, hash-verified

2919 '0.5 1alias3 b'.split())
2920
2921 def test_alias_help(self):
2922 parser = self._get_parser(aliases=True, subparser_help=True)
2923 self.maxDiff = None
2924 self.assertEqual(parser.format_help(), textwrap.dedent("""\
2925 usage: PROG [-h] [--foo] bar COMMAND ...
2926
2927 main description
2928
2929 positional arguments:
2930 bar bar help
2931
2932 options:
2933 -h, --help show this help message and exit
2934 --foo foo help
2935
2936 commands:
2937 COMMAND
2938 1 (1alias1, 1alias2)
2939 1 help
2940 2 2 help
2941 3 3 help
2942 """))
2943
2944# ============
2945# Groups tests

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected