diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-03-18 11:30:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-18 11:30:41 -0400 |
commit | 4f63fdfdc9bf52e99220cd4b1a7a09ea5d78b239 (patch) | |
tree | f0929fbeb5da84316c6d08585e09d02eb23f9189 /tests/test_completion.py | |
parent | 7d4778420afda48043a0ec9aca527cbe27ae75ff (diff) | |
parent | 03e32cab548e703e2790ef89a520fbaffd1a24da (diff) | |
download | cmd2-git-4f63fdfdc9bf52e99220cd4b1a7a09ea5d78b239.tar.gz |
Merge pull request #321 from python-cmd2/unit_test
Fixed indexes in unit tests
Diffstat (limited to 'tests/test_completion.py')
-rw-r--r-- | tests/test_completion.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py index 7f9a6db0..a51a4e1f 100644 --- a/tests/test_completion.py +++ b/tests/test_completion.py @@ -247,7 +247,7 @@ def test_shell_command_completion_doesnt_complete_when_just_shell(cmd2_app): line = 'shell' endidx = len(line) - begidx = endidx - len(text) + begidx = 0 assert cmd2_app.complete_shell(text, line, begidx, endidx) == [] def test_shell_command_completion_does_path_completion_when_after_command(cmd2_app, request): @@ -434,7 +434,7 @@ def test_path_completion_no_tokens(): text = '' line = 'shell' endidx = len(line) - begidx = endidx - len(text) + begidx = 0 assert path_complete(text, line, begidx, endidx) == [] @@ -554,7 +554,7 @@ def test_flag_based_completion_no_tokens(): text = '' line = 'list_food' endidx = len(line) - begidx = endidx - len(text) + begidx = 0 assert flag_based_complete(text, line, begidx, endidx, flag_dict) == [] |