From c539ef4065e9ae8611e1851eaa740f6412f08c25 Mon Sep 17 00:00:00 2001 From: kotfu Date: Thu, 3 May 2018 10:02:21 -0700 Subject: Fix commented out transcript tests --- tests/test_transcript.py | 7 +++---- tests/transcripts/from_cmdloop.txt | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/test_transcript.py b/tests/test_transcript.py index c0fb49c1..c5263c03 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -26,7 +26,6 @@ class CmdLineApp(cmd2.Cmd): def __init__(self, *args, **kwargs): self.multiline_commands = ['orate'] self.maxrepeats = 3 - self.redirector = '->' # Add stuff to settable and/or shortcuts before calling base class initializer self.settable['maxrepeats'] = 'Max number of `--repeat`s allowed' @@ -63,7 +62,7 @@ class CmdLineApp(cmd2.Cmd): def do_mumble(self, opts, arg): """Mumbles what you tell me to.""" repetitions = opts.repeat or 1 - arg = arg.split() + #arg = arg.split() for i in range(min(repetitions, self.maxrepeats)): output = [] if random.random() < .33: @@ -229,7 +228,7 @@ def test_invalid_syntax(_cmdline_app, capsys): ('characterclass.txt', False), ('dotstar.txt', False), ('extension_notation.txt', False), - # ('from_cmdloop.txt', True), + ('from_cmdloop.txt', True), ('multiline_no_regex.txt', False), ('multiline_regex.txt', False), ('regex_set.txt', False), @@ -237,7 +236,7 @@ def test_invalid_syntax(_cmdline_app, capsys): ('slashes_escaped.txt', False), ('slashslash.txt', False), ('spaces.txt', False), - # ('word_boundaries.txt', False), + ('word_boundaries.txt', False), ]) def test_transcript(request, capsys, filename, feedback_to_output): # Create a cmd2.Cmd() instance and make sure basic settings are diff --git a/tests/transcripts/from_cmdloop.txt b/tests/transcripts/from_cmdloop.txt index 13b61b00..5f22d756 100644 --- a/tests/transcripts/from_cmdloop.txt +++ b/tests/transcripts/from_cmdloop.txt @@ -19,7 +19,6 @@ optional arguments:/ */ -s, --shout N00B EMULATION MODE/ */ -r REPEAT, --repeat REPEAT/ */ output [n] times - (Cmd) say goodnight, Gracie goodnight, Gracie (Cmd) say -ps --repeat=5 goodnight, Gracie -- cgit v1.2.1