MCPcopy Create free account
hub / github.com/python-cmd2/cmd2 / test_tokens_for_completion_quoted

Function test_tokens_for_completion_quoted

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

Source from the content-addressed store, hash-verified

685
686
687def test_tokens_for_completion_quoted(cmd2_app) -> None:
688 text = "Pi"
689 line = f'list_food "{text}"'
690 endidx = len(line)
691 begidx = endidx
692
693 expected_tokens = ["list_food", "Pi", ""]
694 expected_raw_tokens = ["list_food", '"Pi"', ""]
695
696 tokens, raw_tokens = cmd2_app.tokens_for_completion(line, begidx, endidx)
697 assert expected_tokens == tokens
698 assert expected_raw_tokens == raw_tokens
699
700
701def test_tokens_for_completion_unclosed_quote(cmd2_app) -> None:

Callers

nothing calls this directly

Calls 1

tokens_for_completionMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…