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

Function test_command_completion_nomatch

tests/test_completion.py:223–233  ·  view source on GitHub ↗
(cmd2_app)

Source from the content-addressed store, hash-verified

221
222
223def test_command_completion_nomatch(cmd2_app) -> None:
224 text = "fakecommand"
225 line = text
226 endidx = len(line)
227 begidx = endidx - len(text)
228
229 completions = cmd2_app.complete(text, line, begidx, endidx)
230 assert not completions
231
232 # ArgparseCompleter raises a _NoResultsError in this case
233 assert "Hint" in completions.error
234
235
236def test_complete_bogus_command(cmd2_app) -> None:

Callers

nothing calls this directly

Calls 1

completeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…