diff options
Diffstat (limited to 'tests/test_completion.py')
-rw-r--r-- | tests/test_completion.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py index 5bdbf457..6f075c67 100644 --- a/tests/test_completion.py +++ b/tests/test_completion.py @@ -26,7 +26,6 @@ def cmd2_app(): @pytest.fixture def cs_app(): - cmd2.Cmd.case_insensitive = False c = cmd2.Cmd() return c @@ -136,21 +135,13 @@ def test_complete_bogus_command(cmd2_app): assert first_match is None -def test_cmd2_command_completion_is_case_insensitive_by_default(cmd2_app): +def test_cmd2_command_completion_is_case_sensitive(cmd2_app): text = 'HE' line = 'HE' endidx = len(line) begidx = endidx - len(text) # It is at end of line, so extra space is present - assert cmd2_app.completenames(text, line, begidx, endidx) == ['help '] - -def test_cmd2_case_sensitive_command_completion(cs_app): - text = 'HE' - line = 'HE' - endidx = len(line) - begidx = endidx - len(text) - # It is at end of line, so extra space is present - assert cs_app.completenames(text, line, begidx, endidx) == [] + assert cmd2_app.completenames(text, line, begidx, endidx) == [] def test_cmd2_command_completion_single_mid(cmd2_app): text = 'he' |