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

Function test_apcustom_completion_callable_count

tests/test_argparse_utils.py:63–70  ·  view source on GitHub ↗
(kwargs, is_valid)

Source from the content-addressed store, hash-verified

61 ],
62)
63def test_apcustom_completion_callable_count(kwargs, is_valid) -> None:
64 parser = Cmd2ArgumentParser()
65 if is_valid:
66 parser.add_argument("name", **kwargs)
67 else:
68 expected_err = "Only one of the following parameters"
69 with pytest.raises(ValueError, match=expected_err):
70 parser.add_argument("name", **kwargs)
71
72
73@pytest.mark.parametrize("kwargs", [({"choices_provider": fake_func}), ({"completer": fake_func})])

Callers

nothing calls this directly

Calls 1

Cmd2ArgumentParserClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…