diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-17 09:28:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-17 09:28:43 -0500 |
commit | 91bc999d022a486334b9054859e2ef6f03ca9666 (patch) | |
tree | d71c32f3b47c2b137d6b9543a605feb8380472a7 /tests/test_transcript.py | |
parent | 6895dea2e19210093e38fa411ef28dfb7f99c32c (diff) | |
parent | 1da904585db4cd1e77c312190149daa946366fa0 (diff) | |
download | cmd2-git-91bc999d022a486334b9054859e2ef6f03ca9666.tar.gz |
Merge pull request #249 from python-cmd2/arglist
decorator changes for replacing optparse with argparse
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r-- | tests/test_transcript.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py index e572e919..41322341 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -14,12 +14,10 @@ import mock import pytest import six -# Used for sm.input: raw_input() for Python 2 or input() for Python 3 -import six.moves as sm - -from cmd2 import (Cmd, make_option, options, Cmd2TestCase, set_use_arg_list, +from cmd2 import (Cmd, options, Cmd2TestCase, set_use_arg_list, set_posix_shlex, set_strip_quotes) from conftest import run_cmd, StdOut, normalize +from optparse import make_option class CmdLineApp(Cmd): @@ -27,7 +25,7 @@ class CmdLineApp(Cmd): MUMBLES = ['like', '...', 'um', 'er', 'hmmm', 'ahh'] MUMBLE_FIRST = ['so', 'like', 'well'] MUMBLE_LAST = ['right?'] - + def __init__(self, *args, **kwargs): self.abbrev = True self.multilineCommands = ['orate'] @@ -132,9 +130,8 @@ def test_base_with_transcript(_cmdline_app): Documented commands (type help <topic>): ======================================== -_relative_load help mumble pyscript save shell speak -cmdenvironment history orate quit say shortcuts -edit load py run set show +edit history mumble py quit set shortcuts +help load orate pyscript say shell speak (Cmd) help say Repeats what you tell me to. @@ -175,7 +172,7 @@ say -ps --repeat=5 goodnight, Gracie set maxrepeats 5 -------------------------[6] say -ps --repeat=5 goodnight, Gracie -(Cmd) run 4 +(Cmd) history -r 4 OODNIGHT, GRACIEGAY OODNIGHT, GRACIEGAY OODNIGHT, GRACIEGAY @@ -332,7 +329,7 @@ def test_transcript(request, capsys, filename, feedback_to_output): ]) def test_parse_transcript_expected(expected, transformed): app = CmdLineApp() - + class TestMyAppCase(Cmd2TestCase): cmdapp = app |