summaryrefslogtreecommitdiff
path: root/tests/test_transcript.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-01-15 01:34:50 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-01-15 01:34:50 -0500
commit141d95194b30d959f6c21f4546100551c442b13d (patch)
tree5d1602a6d2117aaa4910adfff31ad919b85fea07 /tests/test_transcript.py
parent2fcc883f8a7fd5c9fd3beb30465cfa2b86c66ffc (diff)
downloadcmd2-git-141d95194b30d959f6c21f4546100551c442b13d.tar.gz
Made a couple cleanup changes
1) cmd2 no longer imports make_option from optparse - test files and examples now import this directly - this helps emphasize that this old optparse methodology of adding options to commands is deprecated 2) All argparsers have been given custom names instead of just "argparser" - this helps with readability and maintainability, especially with IDE renaming and such
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r--tests/test_transcript.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py
index e572e919..0daad18a 100644
--- a/tests/test_transcript.py
+++ b/tests/test_transcript.py
@@ -17,9 +17,10 @@ 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 +28,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']
@@ -332,7 +333,7 @@ def test_transcript(request, capsys, filename, feedback_to_output):
])
def test_parse_transcript_expected(expected, transformed):
app = CmdLineApp()
-
+
class TestMyAppCase(Cmd2TestCase):
cmdapp = app