From 03e32cab548e703e2790ef89a520fbaffd1a24da Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Sun, 18 Mar 2018 00:43:03 -0400 Subject: [PATCH] Fixed indexes in unit tests --- tests/test_completion.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_completion.py b/tests/test_completion.py index 7f9a6db0a..a51a4e1fd 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) == []