diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-02-13 13:39:53 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-02-13 13:39:53 -0500 |
commit | 41019de4b55f42d17149c29d380358dc38347948 (patch) | |
tree | 896f769ab1d919132b51ee0dbf7006cf07f87961 /tests | |
parent | c3e3c1c595d65ec4c5fa2c9dac88ffa30cf4738e (diff) | |
download | cmd2-git-41019de4b55f42d17149c29d380358dc38347948.tar.gz |
Removed dash from 'tab complete' string
Diffstat (limited to 'tests')
-rw-r--r-- | tests/conftest.py | 2 | ||||
-rwxr-xr-x | tests/test_completion.py | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 7f77a207..9ee8da19 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -185,7 +185,7 @@ def complete_tester(text: str, line: str, begidx: int, endidx: int, app) -> Opti def get_endidx(): return endidx - # Run the readline tab-completion function with readline mocks in place + # Run the readline tab completion function with readline mocks in place with mock.patch.object(readline, 'get_line_buffer', get_line): with mock.patch.object(readline, 'get_begidx', get_begidx): with mock.patch.object(readline, 'get_endidx', get_endidx): diff --git a/tests/test_completion.py b/tests/test_completion.py index 99f832a4..f545c8f9 100755 --- a/tests/test_completion.py +++ b/tests/test_completion.py @@ -1,9 +1,9 @@ # coding=utf-8 # flake8: noqa E302 """ -Unit/functional testing for readline tab-completion functions in the cmd2.py module. +Unit/functional testing for readline tab completion functions in the cmd2.py module. -These are primarily tests related to readline completer functions which handle tab-completion of cmd2/cmd commands, +These are primarily tests related to readline completer functions which handle tab completion of cmd2/cmd commands, file system paths, and shell commands. """ # Python 3.5 had some regressions in the unitest.mock module, so use 3rd party mock if available @@ -39,11 +39,11 @@ delimited_strs = \ # Dictionary used with flag based completion functions flag_dict = \ { - # Tab-complete food items after -f and --food flag in command line + # Tab complete food items after -f and --food flag in command line '-f': food_item_strs, '--food': food_item_strs, - # Tab-complete sport items after -s and --sport flag in command line + # Tab complete sport items after -s and --sport flag in command line '-s': sport_item_strs, '--sport': sport_item_strs, } @@ -51,14 +51,14 @@ flag_dict = \ # Dictionary used with index based completion functions index_dict = \ { - 1: food_item_strs, # Tab-complete food items at index 1 in command line - 2: sport_item_strs, # Tab-complete sport items at index 2 in command line + 1: food_item_strs, # Tab complete food items at index 1 in command line + 2: sport_item_strs, # Tab complete sport items at index 2 in command line } class CompletionsExample(cmd2.Cmd): """ - Example cmd2 application used to exercise tab-completion tests + Example cmd2 application used to exercise tab completion tests """ def __init__(self): cmd2.Cmd.__init__(self, multiline_commands=['test_multiline']) |