From e018bbd79b2ddc0cf2538dff84baa8b2bf460ccd Mon Sep 17 00:00:00 2001 From: Eric Lin Date: Wed, 25 Apr 2018 11:40:33 -0400 Subject: Removed the expensive imports from cmd2/__init__.py Added some shared definitions to cmd2/__init__.py -> maybe there's a better place for these? Figured out how to trick bash into showing argument hints. It's a bit weird. Updated all of the tests and examples to import cmd2 resources from their new location without the automatic imports in cmd2/__init__.py For #369 --- tests/test_transcript.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/test_transcript.py') diff --git a/tests/test_transcript.py b/tests/test_transcript.py index 8ee5f3f6..4f821c06 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -14,8 +14,8 @@ import random from unittest import mock import pytest -import cmd2 -from cmd2 import set_posix_shlex, set_strip_quotes +from cmd2 import cmd2 +from cmd2.cmd2 import set_posix_shlex, set_strip_quotes from .conftest import run_cmd, StdOut, normalize class CmdLineApp(cmd2.Cmd): @@ -189,7 +189,7 @@ now: ---> assert out == expected -class TestMyAppCase(cmd2.cmd2.Cmd2TestCase): +class TestMyAppCase(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(cmd2.cmd2.Cmd2TestCase): + class TestMyAppCase(cmd2.Cmd2TestCase): cmdapp = app testcase = TestMyAppCase() -- cgit v1.2.1