Show More
@@ -1,20 +1,22 b'' | |||
|
1 | 1 | import nose.tools as nt |
|
2 | 2 | |
|
3 | 3 | from IPython.core.error import TryNext |
|
4 | 4 | from IPython.lib.clipboard import ClipboardEmpty |
|
5 | from IPython.testing.decorators import skip_if_no_x11 | |
|
5 | 6 | from IPython.utils.py3compat import unicode_type |
|
6 | 7 | |
|
8 | @skip_if_no_x11 | |
|
7 | 9 | def test_clipboard_get(): |
|
8 | 10 | # Smoketest for clipboard access - we can't easily guarantee that the |
|
9 | 11 | # clipboard is accessible and has something on it, but this tries to |
|
10 | 12 | # exercise the relevant code anyway. |
|
11 | 13 | try: |
|
12 | 14 | a = get_ipython().hooks.clipboard_get() |
|
13 | 15 | except ClipboardEmpty: |
|
14 | 16 | # Nothing in clipboard to get |
|
15 | 17 | pass |
|
16 | 18 | except TryNext: |
|
17 | 19 | # No clipboard access API available |
|
18 | 20 | pass |
|
19 | 21 | else: |
|
20 | 22 | nt.assert_is_instance(a, unicode_type) |
General Comments 0
You need to be logged in to leave comments.
Login now