diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-03-02 20:51:01 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-03-02 20:51:01 -0500 |
commit | b657b45dcca6687da43639c49e65ce4b16303d3d (patch) | |
tree | b4647b2bef6f9ba914d6711e5ddeebd82655fb7f /tests/test_completion.py | |
parent | 40b52252a3108c8989afd6ca7e64ce9d4116cb4f (diff) | |
download | cmd2-git-b657b45dcca6687da43639c49e65ce4b16303d3d.tar.gz |
Removed support for case-insensitive command parsing
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' |