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

Function test_tokens_for_completion_unclosed_quote

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

Source from the content-addressed store, hash-verified

699
700
701def test_tokens_for_completion_unclosed_quote(cmd2_app) -> None:
702 text = "Pi"
703 line = f'list_food "{text}'
704 endidx = len(line)
705 begidx = endidx - len(text)
706
707 expected_tokens = ["list_food", "Pi"]
708 expected_raw_tokens = ["list_food", '"Pi']
709
710 tokens, raw_tokens = cmd2_app.tokens_for_completion(line, begidx, endidx)
711 assert expected_tokens == tokens
712 assert expected_raw_tokens == raw_tokens
713
714
715def test_tokens_for_completion_punctuation(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…