Skip to content

Commit 9bdde1b

Browse files
committed
Renamed variable to match what its called in cmd2.py
1 parent 3140fe0 commit 9bdde1b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_completion.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -736,12 +736,12 @@ def test_add_opening_quote_delimited_quote_added(cmd2_app):
736736
endidx = len(line)
737737
begidx = endidx - len(text)
738738

739-
expected_prefix = '"/home/user/file'
739+
expected_common_prefix = '"/home/user/file'
740740
expected_display = sorted(['file.txt', 'file space.txt'])
741741

742742
first_match = complete_tester(text, line, begidx, endidx, cmd2_app)
743743
assert first_match is not None and \
744-
os.path.commonprefix(cmd2_app.completion_matches) == expected_prefix and \
744+
os.path.commonprefix(cmd2_app.completion_matches) == expected_common_prefix and \
745745
cmd2_app.display_matches == expected_display
746746

747747
def test_add_opening_quote_delimited_text_is_common_prefix(cmd2_app):
@@ -751,12 +751,12 @@ def test_add_opening_quote_delimited_text_is_common_prefix(cmd2_app):
751751
endidx = len(line)
752752
begidx = endidx - len(text)
753753

754-
expected_prefix = '"/home/user/file'
754+
expected_common_prefix = '"/home/user/file'
755755
expected_display = sorted(['file.txt', 'file space.txt'])
756756

757757
first_match = complete_tester(text, line, begidx, endidx, cmd2_app)
758758
assert first_match is not None and \
759-
os.path.commonprefix(cmd2_app.completion_matches) == expected_prefix and \
759+
os.path.commonprefix(cmd2_app.completion_matches) == expected_common_prefix and \
760760
cmd2_app.display_matches == expected_display
761761

762762
def test_add_opening_quote_delimited_space_in_prefix(cmd2_app):
@@ -766,12 +766,12 @@ def test_add_opening_quote_delimited_space_in_prefix(cmd2_app):
766766
endidx = len(line)
767767
begidx = endidx - len(text)
768768

769-
expected_prefix = '"/home/other user/'
769+
expected_common_prefix = '"/home/other user/'
770770
expected_display = ['maps', 'tests']
771771

772772
first_match = complete_tester(text, line, begidx, endidx, cmd2_app)
773773
assert first_match is not None and \
774-
os.path.commonprefix(cmd2_app.completion_matches) == expected_prefix and \
774+
os.path.commonprefix(cmd2_app.completion_matches) == expected_common_prefix and \
775775
cmd2_app.display_matches == expected_display
776776

777777
class SubcommandsExample(cmd2.Cmd):

0 commit comments

Comments
 (0)