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

Function test_basic_completion

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

Source from the content-addressed store, hash-verified

616
617
618def test_basic_completion(cmd2_app) -> None:
619 text = "P"
620 line = f"list_food -f {text}"
621 endidx = len(line)
622 begidx = endidx - len(text)
623
624 expected = ["Pizza", "Potato"]
625 completions = cmd2_app.basic_complete(text, line, begidx, endidx, food_item_strs)
626 assert completions.to_strings() == Completions.from_values(expected).to_strings()
627
628
629def test_basic_completion_nomatch(cmd2_app) -> None:

Callers

nothing calls this directly

Calls 3

basic_completeMethod · 0.80
to_stringsMethod · 0.80
from_valuesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…