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

Function test_resolve_completer_with_bad_input

tests/test_cmd2.py:2189–2202  ·  view source on GitHub ↗
(base_app: cmd2.Cmd)

Source from the content-addressed store, hash-verified

2187
2188
2189def test_resolve_completer_with_bad_input(base_app: cmd2.Cmd) -> None:
2190 mock_provider = mock.MagicMock()
2191 mock_completer = mock.MagicMock()
2192 mock_parser = mock.MagicMock()
2193
2194 with pytest.raises(ValueError) as excinfo: # noqa: PT011
2195 base_app._resolve_completer(
2196 choices=[],
2197 choices_provider=mock_provider,
2198 completer=mock_completer,
2199 parser=mock_parser,
2200 )
2201
2202 assert "None of the following parameters can be used alongside a parser" in str(excinfo.value)
2203
2204
2205def test_custom_stdout() -> None:

Callers

nothing calls this directly

Calls 1

_resolve_completerMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…