diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-06-12 17:21:29 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-06-12 17:21:29 -0400 |
commit | 8e90658aac568ca5948d99a3103a5c8ae08f71a5 (patch) | |
tree | b9d3d415f2ea72bb0348b935ef3099423a7cdea4 /tests | |
parent | 6b38d416a38fdf0d7fec8425d2761800cb891f06 (diff) | |
download | cmd2-git-8e90658aac568ca5948d99a3103a5c8ae08f71a5.tar.gz |
Updated unit test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_transcript.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py index ed4c2755..5dd39e1b 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -224,18 +224,17 @@ def test_generate_transcript_stop(capsys): fd, transcript_fname = tempfile.mkstemp(prefix='', suffix='.trn') os.close(fd) - # This should run all commands return False for stop + # This should run all commands commands = ['help', 'alias'] - stop = app._generate_transcript(commands, transcript_fname) + app._generate_transcript(commands, transcript_fname) _, err = capsys.readouterr() - assert not stop assert err.startswith("2 commands") # Since quit returns True for stop, only the first 2 commands will run commands = ['help', 'quit', 'alias'] app._generate_transcript(commands, transcript_fname) _, err = capsys.readouterr() - assert "triggered a stop" in err + assert err.startswith("Command 2 triggered a stop") @pytest.mark.parametrize('expected, transformed', [ |