diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-09-24 10:35:21 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-09-24 10:35:21 -0400 |
commit | b918b22c65a3f2370e028caabf4548240dcbc661 (patch) | |
tree | 818a5f4da3eb057a7d9da2a83efe9caa4259e9bf /tests/test_completion.py | |
parent | dc4b313ac20ac538f663e563d955c18c13a9d92b (diff) | |
parent | e5e8a7954b9ace78cd49ef43c5f8d6203c227f0f (diff) | |
download | cmd2-git-b918b22c65a3f2370e028caabf4548240dcbc661.tar.gz |
Merge branch 'master' into alert_printer
Diffstat (limited to 'tests/test_completion.py')
-rw-r--r-- | tests/test_completion.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py index 00a120cc..40299954 100644 --- a/tests/test_completion.py +++ b/tests/test_completion.py @@ -15,7 +15,7 @@ import sys import pytest import cmd2 from cmd2 import utils -from .conftest import complete_tester, StdOut +from .conftest import complete_tester from examples.subcommands import SubcommandsExample # List of strings used with completion functions @@ -114,13 +114,6 @@ def test_complete_bogus_command(cmd2_app): assert first_match is None -def test_cmd2_command_completion_single(cmd2_app): - text = 'hel' - line = text - endidx = len(line) - begidx = endidx - len(text) - assert cmd2_app.completenames(text, line, begidx, endidx) == ['help'] - def test_cmd2_command_completion_multiple(cmd2_app): text = 'h' line = text @@ -694,8 +687,7 @@ def test_add_opening_quote_delimited_space_in_prefix(cmd2_app): @pytest.fixture def sc_app(): c = SubcommandsExample() - c.stdout = StdOut() - + c.stdout = utils.StdSim(c.stdout) return c def test_cmd2_subcommand_completion_single_end(sc_app): @@ -843,7 +835,7 @@ class SubcommandsWithUnknownExample(cmd2.Cmd): func(self, args) else: # No subcommand was provided, so call help - self.do_help('base') + self.do_help(['base']) @pytest.fixture |