summaryrefslogtreecommitdiff
path: root/tests/test_completion.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-04-15 01:26:39 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-04-15 01:26:39 -0400
commit9bdde1b84a9aa06b3a8d2211b79dc9d2a3626551 (patch)
tree8c2231e98ef73359d1b8b893b27363528717fa2b /tests/test_completion.py
parent3140fe01ea00a50bdb48b17bca0c5dc513c2ca70 (diff)
downloadcmd2-git-9bdde1b84a9aa06b3a8d2211b79dc9d2a3626551.tar.gz
Renamed variable to match what its called in cmd2.py
Diffstat (limited to 'tests/test_completion.py')
-rw-r--r--tests/test_completion.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py
index 5b236130..b102bc0a 100644
--- a/tests/test_completion.py
+++ b/tests/test_completion.py
@@ -736,12 +736,12 @@ def test_add_opening_quote_delimited_quote_added(cmd2_app):
endidx = len(line)
begidx = endidx - len(text)
- expected_prefix = '"/home/user/file'
+ expected_common_prefix = '"/home/user/file'
expected_display = sorted(['file.txt', 'file space.txt'])
first_match = complete_tester(text, line, begidx, endidx, cmd2_app)
assert first_match is not None and \
- os.path.commonprefix(cmd2_app.completion_matches) == expected_prefix and \
+ os.path.commonprefix(cmd2_app.completion_matches) == expected_common_prefix and \
cmd2_app.display_matches == expected_display
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):
endidx = len(line)
begidx = endidx - len(text)
- expected_prefix = '"/home/user/file'
+ expected_common_prefix = '"/home/user/file'
expected_display = sorted(['file.txt', 'file space.txt'])
first_match = complete_tester(text, line, begidx, endidx, cmd2_app)
assert first_match is not None and \
- os.path.commonprefix(cmd2_app.completion_matches) == expected_prefix and \
+ os.path.commonprefix(cmd2_app.completion_matches) == expected_common_prefix and \
cmd2_app.display_matches == expected_display
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):
endidx = len(line)
begidx = endidx - len(text)
- expected_prefix = '"/home/other user/'
+ expected_common_prefix = '"/home/other user/'
expected_display = ['maps', 'tests']
first_match = complete_tester(text, line, begidx, endidx, cmd2_app)
assert first_match is not None and \
- os.path.commonprefix(cmd2_app.completion_matches) == expected_prefix and \
+ os.path.commonprefix(cmd2_app.completion_matches) == expected_common_prefix and \
cmd2_app.display_matches == expected_display
class SubcommandsExample(cmd2.Cmd):