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

Method complete_foo_val

tests/test_completion.py:194–197  ·  view source on GitHub ↗

Supports unit testing cmd2.Cmd2.complete_set_val to confirm it passes all tokens in the set command

(self, text, line, begidx, endidx, arg_tokens)

Source from the content-addressed store, hash-verified

192 """Completing this should result in completedefault() being called"""
193
194 def complete_foo_val(self, text, line, begidx, endidx, arg_tokens) -> Completions:
195 """Supports unit testing cmd2.Cmd2.complete_set_val to confirm it passes all tokens in the set command"""
196 value = "SUCCESS" if "param" in arg_tokens else "FAIL"
197 return Completions.from_values([value])
198
199 def completedefault(self, *ignored) -> Completions:
200 """Method called to complete an input line when no command-specific

Callers

nothing calls this directly

Calls 1

from_valuesMethod · 0.80

Tested by

no test coverage detected