summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2020-02-13 22:34:22 -0500
committerGitHub <noreply@github.com>2020-02-13 22:34:22 -0500
commit013b9e0a2c75e17f8aa0e0f7cbe50d84d2f657d8 (patch)
treee3cc4c27ed21a2e1d01caae0bda4ea51c44e59f6 /tests
parentad0e2ae0d0d426fe08353fd82d1f9ff051be9108 (diff)
parent7fe5cf7c1ab7d7a68991d1aeebaa338f7c5d2fd0 (diff)
downloadcmd2-git-013b9e0a2c75e17f8aa0e0f7cbe50d84d2f657d8.tar.gz
Merge pull request #887 from python-cmd2/completion_docs
Completion docs
Diffstat (limited to 'tests')
-rw-r--r--tests/conftest.py2
-rwxr-xr-xtests/test_completion.py14
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'])