diff options
author | kotfu <kotfu@kotfu.net> | 2018-04-16 23:34:23 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-04-16 23:34:23 -0600 |
commit | ff4ebc85bb5185efec9a072e38129c3982ad83af (patch) | |
tree | 9413ba579ca3874c6634710b32ce458ca9719ed1 | |
parent | 46ebe95304de710145ded8caf421c6b6950dba6d (diff) | |
download | cmd2-git-ff4ebc85bb5185efec9a072e38129c3982ad83af.tar.gz |
Most of the unit tests fixed.
-rw-r--r-- | cmd2/__init__.py | 4 | ||||
-rw-r--r-- | tests/__init__.py | 3 | ||||
-rw-r--r-- | tests/test_argparse.py | 2 | ||||
-rw-r--r-- | tests/test_cmd2.py | 4 | ||||
-rw-r--r-- | tests/test_submenu.py | 2 | ||||
-rw-r--r-- | tests/test_transcript.py | 2 |
6 files changed, 9 insertions, 8 deletions
diff --git a/cmd2/__init__.py b/cmd2/__init__.py index fe3747e0..d5db3b06 100644 --- a/cmd2/__init__.py +++ b/cmd2/__init__.py @@ -1,6 +1,8 @@ # # -*- coding: utf-8 -*- # -from .cmd2 import Cmd, Cmd2TestCase, set_posix_shlex, set_strip_quotes, AddSubmenu +from .cmd2 import Cmd, Cmd2TestCase, set_posix_shlex, set_strip_quotes, AddSubmenu, cast +from .cmd2 import _which, get_paste_buffer, __version__, POSIX_SHLEX from .cmd2 import can_clip, with_category, categorize from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args +from .cmd2 import ParserManager, History, HistoryItem, EmptyStatement diff --git a/tests/__init__.py b/tests/__init__.py index 6d3e5a82..2aeb9ddf 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,5 +1,4 @@ # # -*- coding: utf-8 -*- # -from .conftest import run_cmd, StdOut, normalize, BASE_HELP, BASE_HELP_VERBOSE, \ - HELP_HISTORY, SHORTCUTS_TXT, SHOW_TXT, SHOW_LONG + diff --git a/tests/test_argparse.py b/tests/test_argparse.py index 569dc57b..6a9a93a7 100644 --- a/tests/test_argparse.py +++ b/tests/test_argparse.py @@ -8,7 +8,7 @@ import pytest import cmd2 from unittest import mock -#from conftest import run_cmd, StdOut +from .conftest import run_cmd, StdOut # Prefer statically linked gnureadline if available (for macOS compatibility due to issues with libedit) try: diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index bf6d5242..b3d903ca 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -22,8 +22,8 @@ except ImportError: from unittest import mock import cmd2 -#from conftest import run_cmd, normalize, BASE_HELP, BASE_HELP_VERBOSE, \ -# HELP_HISTORY, SHORTCUTS_TXT, SHOW_TXT, SHOW_LONG, StdOut +from .conftest import run_cmd, normalize, BASE_HELP, BASE_HELP_VERBOSE, \ + HELP_HISTORY, SHORTCUTS_TXT, SHOW_TXT, SHOW_LONG, StdOut def test_ver(): diff --git a/tests/test_submenu.py b/tests/test_submenu.py index f91991ea..fbb9857b 100644 --- a/tests/test_submenu.py +++ b/tests/test_submenu.py @@ -5,7 +5,7 @@ Cmd2 testing for argument parsing import pytest import cmd2 -#from conftest import run_cmd, StdOut, normalize +from .conftest import run_cmd, StdOut, normalize class SecondLevelB(cmd2.Cmd): diff --git a/tests/test_transcript.py b/tests/test_transcript.py index f3d98b0a..e25d8532 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -16,7 +16,7 @@ import pytest import cmd2 from cmd2 import Cmd, Cmd2TestCase, set_posix_shlex, set_strip_quotes -#from conftest import run_cmd, StdOut, normalize +from .conftest import run_cmd, StdOut, normalize class CmdLineApp(Cmd): |