summaryrefslogtreecommitdiff
path: root/tests/test_cmd2.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r--tests/test_cmd2.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index b453bca9..4fd9ca1c 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -647,11 +647,10 @@ def test_cmdloop_without_rawinput():
assert out == expected
+@pytest.mark.skipif(not cmd2.can_clip,
+ reason="CLI utility for interacting with PasteBuffer/ClipBoard is not available")
def test_pastebuffer_read_and_write():
text_to_pb = 'This is a test ...'
cmd2.write_to_paste_buffer(text_to_pb)
text_from_pb = cmd2.get_paste_buffer()
-
- # If the tools for interacting with the clipboard/pastebuffer are available
- if cmd2.can_clip:
- assert text_from_pb == text_to_pb
+ assert text_from_pb == text_to_pb