Skip to content

Commit 03e32ca

Browse files
committed
Fixed indexes in unit tests
1 parent 7d47784 commit 03e32ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_completion.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def test_shell_command_completion_doesnt_complete_when_just_shell(cmd2_app):
247247
line = 'shell'
248248

249249
endidx = len(line)
250-
begidx = endidx - len(text)
250+
begidx = 0
251251
assert cmd2_app.complete_shell(text, line, begidx, endidx) == []
252252

253253
def test_shell_command_completion_does_path_completion_when_after_command(cmd2_app, request):
@@ -434,7 +434,7 @@ def test_path_completion_no_tokens():
434434
text = ''
435435
line = 'shell'
436436
endidx = len(line)
437-
begidx = endidx - len(text)
437+
begidx = 0
438438
assert path_complete(text, line, begidx, endidx) == []
439439

440440

@@ -554,7 +554,7 @@ def test_flag_based_completion_no_tokens():
554554
text = ''
555555
line = 'list_food'
556556
endidx = len(line)
557-
begidx = endidx - len(text)
557+
begidx = 0
558558

559559
assert flag_based_complete(text, line, begidx, endidx, flag_dict) == []
560560

0 commit comments

Comments
 (0)