diff options
author | kotfu <kotfu@kotfu.net> | 2018-06-21 14:54:00 -0500 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-06-21 14:54:00 -0500 |
commit | 37b2f68b7ec021d1bfca739b343460d4d97a49d1 (patch) | |
tree | fdd93557c30c9fde42dbb95cfd4a0b5cf887844c /tests | |
parent | 101395a437ef66846e207c039a12ee946128fab9 (diff) | |
parent | 52795b7071e13a505c9131084f0d80d1a2dfc1f6 (diff) | |
download | cmd2-git-37b2f68b7ec021d1bfca739b343460d4d97a49d1.tar.gz |
Merge branch 'master' into plugin_functions
# Conflicts:
# cmd2/cmd2.py
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cmd2.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index f167793e..26df4807 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -22,6 +22,7 @@ except ImportError: from unittest import mock import cmd2 +from cmd2 import clipboard from cmd2 import utils from .conftest import run_cmd, normalize, BASE_HELP, BASE_HELP_VERBOSE, \ HELP_HISTORY, SHORTCUTS_TXT, SHOW_TXT, SHOW_LONG, StdOut @@ -735,7 +736,7 @@ def test_pipe_to_shell_error(base_app, capsys): assert err.startswith("EXCEPTION of type '{}' occurred with message:".format(expected_error)) -@pytest.mark.skipif(not cmd2.cmd2.can_clip, +@pytest.mark.skipif(not clipboard.can_clip, reason="Pyperclip could not find a copy/paste mechanism for your system") def test_send_to_paste_buffer(base_app): # Test writing to the PasteBuffer/Clipboard @@ -1454,13 +1455,12 @@ def test_multiline_complete_statement_without_terminator(multiline_app): assert statement.command == command -def test_clipboard_failure(capsys): +def test_clipboard_failure(base_app, capsys): # Force cmd2 clipboard to be disabled - cmd2.cmd2.disable_clip() - app = cmd2.Cmd() + base_app.can_clip = False # Redirect command output to the clipboard when a clipboard isn't present - app.onecmd_plus_hooks('help > ') + base_app.onecmd_plus_hooks('help > ') # Make sure we got the error output out, err = capsys.readouterr() |