MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / test_apcustom_metavar_tuple

Function test_apcustom_metavar_tuple

tests/test_argparse_utils.py:286–290  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

284
285
286def test_apcustom_metavar_tuple() -> None:
287 # Test the case when a tuple metavar is used with nargs an integer > 1
288 parser = Cmd2ArgumentParser()
289 parser.add_argument("--aflag", nargs=2, metavar=("foo", "bar"), help="This is a test")
290 assert "[--aflag foo bar]" in parser.format_help()
291
292
293def test_register_argparse_argument_parameter() -> None:

Callers

nothing calls this directly

Calls 2

format_helpMethod · 0.95
Cmd2ArgumentParserClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…