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

Function test_command_completion

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

Source from the content-addressed store, hash-verified

210
211
212def test_command_completion(cmd2_app) -> None:
213 text = "run"
214 line = text
215 endidx = len(line)
216 begidx = endidx - len(text)
217
218 expected = ["run_pyscript", "run_script"]
219 completions = cmd2_app.complete(text, line, begidx, endidx)
220 assert completions.to_strings() == Completions.from_values(expected).to_strings()
221
222
223def test_command_completion_nomatch(cmd2_app) -> None:

Callers

nothing calls this directly

Calls 3

to_stringsMethod · 0.80
from_valuesMethod · 0.80
completeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…