diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-04-17 20:45:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-17 20:45:09 -0700 |
commit | 01e434183d3333b1be03c293a82e36b034e0f78b (patch) | |
tree | caef34b8dbc7389b249876d182e1ec6629f02db3 /tests/test_transcript.py | |
parent | 49f02121cbe01de1c8203a15e22ab928b37b8971 (diff) | |
parent | 9697bf1858c6ef06e13bdfd3dfaea6d0376d9a6a (diff) | |
download | cmd2-git-01e434183d3333b1be03c293a82e36b034e0f78b.tar.gz |
Merge pull request #360 from python-cmd2/package
Convert cmd2 to a multi-file Python package
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r-- | tests/test_transcript.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py index a24f2fa5..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 conftest import run_cmd, StdOut, normalize +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() |