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

Function test_help_completion

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

Source from the content-addressed store, hash-verified

300
301
302def test_help_completion(cmd2_app) -> None:
303 text = "h"
304 line = f"help {text}"
305 endidx = len(line)
306 begidx = endidx - len(text)
307
308 expected = ["help", "history"]
309 completions = cmd2_app.complete(text, line, begidx, endidx)
310 assert completions.to_strings() == Completions.from_values(expected).to_strings()
311
312
313def test_help_completion_empty_arg(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…