diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-04-17 19:30:18 -0700 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-04-17 19:30:18 -0700 |
commit | 9697bf1858c6ef06e13bdfd3dfaea6d0376d9a6a (patch) | |
tree | caef34b8dbc7389b249876d182e1ec6629f02db3 /tests/test_transcript.py | |
parent | b3e6625001e64a2516eba33ca526d45e25d1ca5f (diff) | |
download | cmd2-git-9697bf1858c6ef06e13bdfd3dfaea6d0376d9a6a.tar.gz |
Cleaned up __init__.py
Removed things which were only needed for unit tests from __init__.py
- Converted to importing from cmd2.cmd2.<foo> within the relevant unit tests
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r-- | tests/test_transcript.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py index e25d8532..8ee5f3f6 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -15,10 +15,10 @@ from unittest import mock import pytest import cmd2 -from cmd2 import Cmd, Cmd2TestCase, set_posix_shlex, set_strip_quotes +from cmd2 import set_posix_shlex, set_strip_quotes from .conftest import run_cmd, StdOut, normalize -class CmdLineApp(Cmd): +class CmdLineApp(cmd2.Cmd): MUMBLES = ['like', '...', 'um', 'er', 'hmmm', 'ahh'] MUMBLE_FIRST = ['so', 'like', 'well'] @@ -82,7 +82,7 @@ class CmdLineApp(Cmd): self.poutput(' '.join(output)) -class DemoApp(Cmd): +class DemoApp(cmd2.Cmd): hello_parser = argparse.ArgumentParser() hello_parser.add_argument('-n', '--name', help="your name") @cmd2.with_argparser_and_unknown_args(hello_parser) @@ -189,7 +189,7 @@ now: ---> assert out == expected -class TestMyAppCase(Cmd2TestCase): +class TestMyAppCase(cmd2.cmd2.Cmd2TestCase): CmdApp = CmdLineApp CmdApp.testfiles = ['tests/transcript.txt'] @@ -293,7 +293,7 @@ def test_transcript(request, capsys, filename, feedback_to_output): def test_parse_transcript_expected(expected, transformed): app = CmdLineApp() - class TestMyAppCase(Cmd2TestCase): + class TestMyAppCase(cmd2.cmd2.Cmd2TestCase): cmdapp = app testcase = TestMyAppCase() |