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

Function test_set_allow_style_completion

tests/test_completion.py:334–343  ·  view source on GitHub ↗

Confirm that completing allow_style presents AllowStyle strings

(cmd2_app)

Source from the content-addressed store, hash-verified

332
333
334def test_set_allow_style_completion(cmd2_app) -> None:
335 """Confirm that completing allow_style presents AllowStyle strings"""
336 text = ""
337 line = "set allow_style"
338 endidx = len(line)
339 begidx = endidx - len(text)
340
341 expected = [val.name.lower() for val in cmd2.rich_utils.AllowStyle]
342 completions = cmd2_app.complete(text, line, begidx, endidx)
343 assert completions.to_strings() == Completions.from_values(expected).to_strings()
344
345
346def test_set_bool_completion(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…