summaryrefslogtreecommitdiff
path: root/tests/test_transcript.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-07-02 17:45:12 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-07-02 17:45:12 -0400
commitb0c3fa4dd7d762fb812a9cf74e6879dbfba04a50 (patch)
tree7324bef4db334308b257388f758e259b85d09da7 /tests/test_transcript.py
parent482e9ce1f21677667eca52326d966a594ef6cc1a (diff)
downloadcmd2-git-b0c3fa4dd7d762fb812a9cf74e6879dbfba04a50.tar.gz
Fixed bugs, removed dead code, and added unit tests
Fixed a bug where CmdResult named tuple Truthiness wasn't working in Python 2 Removed unused cmd2.History.search() method. Added unit tests for: - History class - cast() function - CmdResult namedtuple
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r--tests/test_transcript.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py
index d1363f8e..87640b5e 100644
--- a/tests/test_transcript.py
+++ b/tests/test_transcript.py
@@ -30,6 +30,7 @@ class CmdLineApp(Cmd):
# Need to use this older form of invoking super class constructor to support Python 2.x and Python 3.x
Cmd.__init__(self, *args, **kwargs)
+ self.intro = 'This is an intro banner ...'
# Configure how arguments are parsed for @options commands
set_posix_shlex(False)
@@ -224,7 +225,7 @@ def test_optarser_options_with_spaces_in_quotes(_demo_app):
def test_commands_at_invocation():
testargs = ["prog", "say hello", "say Gracie", "quit"]
- expected = "hello\nGracie\n"
+ expected = "This is an intro banner ...\nhello\nGracie\n"
with mock.patch.object(sys, 'argv', testargs):
app = CmdLineApp()
app.stdout = StdOut()