summaryrefslogtreecommitdiff
path: root/tests/test_plugin.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2020-02-18 21:05:10 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2020-02-18 21:05:10 -0500
commitf7441431697e4ba94202a1484721ae8acf3a4ab7 (patch)
tree234c893f8cb90138d86b668ba12d0bf448de4b52 /tests/test_plugin.py
parent970c5fc42c69c1c03640c979df341e85e3c38848 (diff)
downloadcmd2-git-f7441431697e4ba94202a1484721ae8acf3a4ab7.tar.gz
Moved custom cmd2 exceptions to a separate file and removed them from public API
Diffstat (limited to 'tests/test_plugin.py')
-rw-r--r--tests/test_plugin.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_plugin.py b/tests/test_plugin.py
index f7065db5..c118b60d 100644
--- a/tests/test_plugin.py
+++ b/tests/test_plugin.py
@@ -14,7 +14,7 @@ except ImportError:
from unittest import mock
import cmd2
-from cmd2 import plugin
+from cmd2 import exceptions, plugin
class Plugin:
@@ -81,7 +81,7 @@ class Plugin:
def postparse_hook_emptystatement(self, data: cmd2.plugin.PostparsingData) -> cmd2.plugin.PostparsingData:
"""A postparsing hook with raises an EmptyStatement exception"""
self.called_postparsing += 1
- raise cmd2.EmptyStatement
+ raise exceptions.EmptyStatement
def postparse_hook_exception(self, data: cmd2.plugin.PostparsingData) -> cmd2.plugin.PostparsingData:
"""A postparsing hook which raises an exception"""
@@ -126,7 +126,7 @@ class Plugin:
def precmd_hook_emptystatement(self, data: plugin.PrecommandData) -> plugin.PrecommandData:
"""A precommand hook which raises an EmptyStatement exception"""
self.called_precmd += 1
- raise cmd2.EmptyStatement
+ raise exceptions.EmptyStatement
def precmd_hook_exception(self, data: plugin.PrecommandData) -> plugin.PrecommandData:
"""A precommand hook which raises an exception"""