summaryrefslogtreecommitdiff
path: root/tests/test_transcript.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-09-30 11:45:39 -0400
committerGitHub <noreply@github.com>2018-09-30 11:45:39 -0400
commitaae1c61bab32188be9c47c125604c81db120885f (patch)
tree2065cc6519b10c6708fd58bf0e214d8f9aa0b516 /tests/test_transcript.py
parent6ec2af3bc9f0fd82f80b91a7d38540fa930291f9 (diff)
parent5a77702462a95de55cd70f5130e244db296abcd5 (diff)
downloadcmd2-git-aae1c61bab32188be9c47c125604c81db120885f.tar.gz
Merge pull request #555 from python-cmd2/transcript_fixes
Transcript fixes
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r--tests/test_transcript.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py
index f854241b..58ae16b4 100644
--- a/tests/test_transcript.py
+++ b/tests/test_transcript.py
@@ -79,6 +79,10 @@ class CmdLineApp(cmd2.Cmd):
output.append(random.choice(self.MUMBLE_LAST))
self.poutput(' '.join(output))
+ def do_nothing(self, statement):
+ """Do nothing and output nothing"""
+ pass
+
def test_commands_at_invocation():
testargs = ["prog", "say hello", "say Gracie", "quit"]
@@ -98,6 +102,8 @@ def test_commands_at_invocation():
('from_cmdloop.txt', True),
('multiline_no_regex.txt', False),
('multiline_regex.txt', False),
+ ('no_output.txt', False),
+ ('no_output_last.txt', False),
('regex_set.txt', False),
('singleslash.txt', False),
('slashes_escaped.txt', False),
@@ -125,7 +131,7 @@ def test_transcript(request, capsys, filename, feedback_to_output):
# Check for the unittest "OK" condition for the 1 test which ran
expected_start = ".\n----------------------------------------------------------------------\nRan 1 test in"
expected_end = "s\n\nOK\n"
- out, err = capsys.readouterr()
+ _, err = capsys.readouterr()
assert err.startswith(expected_start)
assert err.endswith(expected_end)