diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-09-30 11:17:04 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-09-30 11:17:04 -0400 |
commit | 81ad085cffc8f8af7fb7884bcc5db6fcede09df6 (patch) | |
tree | a197a6c81767f10b62d6ac6acfd46e42357a8289 /tests/test_autocompletion.py | |
parent | 85a21ef39467dc24a6f6f8c4f3ac656f24d6ff90 (diff) | |
parent | 61d5703cd3586b3460669a6260cf903c9863b240 (diff) | |
download | cmd2-git-81ad085cffc8f8af7fb7884bcc5db6fcede09df6.tar.gz |
Merged master into transcript_fixes branch and resolved conflicts
Diffstat (limited to 'tests/test_autocompletion.py')
-rw-r--r-- | tests/test_autocompletion.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/test_autocompletion.py b/tests/test_autocompletion.py index 8aa26e0e..c6c1d1f6 100644 --- a/tests/test_autocompletion.py +++ b/tests/test_autocompletion.py @@ -1,3 +1,4 @@ +# coding=utf-8 """ Unit/functional testing for argparse completer in cmd2 @@ -5,16 +6,17 @@ Copyright 2018 Eric Lin <anselor@gmail.com> Released under MIT license, see LICENSE file """ import pytest -from .conftest import run_cmd, normalize, StdOut, complete_tester + +from cmd2.utils import StdSim +from .conftest import run_cmd, normalize, complete_tester from examples.tab_autocompletion import TabCompleteExample @pytest.fixture def cmd2_app(): - c = TabCompleteExample() - c.stdout = StdOut() - - return c + app = TabCompleteExample() + app.stdout = StdSim(app.stdout) + return app SUGGEST_HELP = '''Usage: suggest -t {movie, show} [-h] [-d DURATION{1..2}] @@ -32,9 +34,9 @@ optional arguments: single value - maximum duration [a, b] - duration range''' -MEDIA_MOVIES_ADD_HELP = '''Usage: media movies add title {G, PG, PG-13, R, NC-17} [actor [...]] - -d DIRECTOR{1..2} +MEDIA_MOVIES_ADD_HELP = '''Usage: media movies add -d DIRECTOR{1..2} [-h] + title {G, PG, PG-13, R, NC-17} [actor [...]] positional arguments: title Movie Title |