diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-01-29 21:46:12 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-01-29 21:46:12 -0500 |
commit | 9c8056f03ff0e6fac515d9b8defff68a5eeef454 (patch) | |
tree | 2edde27d4b855bce7b89dd875bdd2fad688bfa6b /tests/test_transcript.py | |
parent | d3bab07ff700e596795b42290a17c0ec557b15da (diff) | |
download | cmd2-git-9c8056f03ff0e6fac515d9b8defff68a5eeef454.tar.gz |
Added a 2nd way of unit testing transcript tests which covers some additional code.
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r-- | tests/test_transcript.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py index d7e40295..253b338d 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -1,13 +1,14 @@ # coding=utf-8 -# -# Cmd2 functional testing based on transcript -# -# Copyright 2016 Federico Ceratto <federico.ceratto@gmail.com> -# Released under MIT license, see LICENSE file +""" +Cmd2 functional testing based on transcript + +Copyright 2016 Federico Ceratto <federico.ceratto@gmail.com> +Released under MIT license, see LICENSE file +""" import pytest -from cmd2 import Cmd, make_option, options +from cmd2 import Cmd, make_option, options, Cmd2TestCase from conftest import run_cmd, StdOut, _normalize @@ -134,3 +135,8 @@ now: ---> for cmd, expected in _get_transcript_blocks(transcript): out = run_cmd(app, cmd) assert out == expected + + +class TestMyAppCase(Cmd2TestCase): + CmdApp = CmdLineApp + CmdApp.testfiles = ['tests/transcript.txt'] |