Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/test_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch for a few unit tests which were passing but for the wrong reasons!

assert cmd2_app.complete_shell(text, line, begidx, endidx) == []

def test_shell_command_completion_does_path_completion_when_after_command(cmd2_app, request):
Expand Down Expand Up @@ -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) == []


Expand Down Expand Up @@ -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) == []

Expand Down