summaryrefslogtreecommitdiff
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-09-27 20:01:02 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-09-27 20:01:02 -0400
commit74129347da01bae550a56f3ecc09be7aec64d5c8 (patch)
treef469a7a3ea264c05effc3560a826275cc641c1a2 /tests/conftest.py
parentb79790d5e8259376cbf0201d1d69f9895492aeef (diff)
downloadcmd2-git-74129347da01bae550a56f3ecc09be7aec64d5c8.tar.gz
Made _func_named() more reliable
Added unit tests
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index b86622ac..949d5419 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -160,11 +160,9 @@ def complete_tester(text: str, line: str, begidx: int, endidx: int, app) -> Opti
def get_endidx():
return endidx
- first_match = None
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):
# Run the readline tab-completion function with readline mocks in place
first_match = app.complete(text, 0)
-
- return first_match
+ return first_match