Skip to content

Commit ac8ae60

Browse files
Ajay SaxenaAjay Saxena
Ajay Saxena
authored and
Ajay Saxena
committed
skip clipboard test if clipboard primitives are absent
1 parent b03ed56 commit ac8ae60

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/io/tests/test_clipboard.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
from pandas import get_option
1111
from pandas.util import testing as tm
1212
from pandas.util.testing import makeCustomDataframe as mkdf
13+
from pandas.util.clipboard.exceptions import PyperclipException
1314

1415

1516
try:
16-
import pandas.util.clipboard # noqa
17-
except OSError:
18-
raise nose.SkipTest("no clipboard found")
17+
DataFrame({'A': [1, 2]}).to_clipboard()
18+
except PyperclipException:
19+
raise nose.SkipTest("clipboard primitives not installed")
1920

2021

2122
class TestClipboard(tm.TestCase):

0 commit comments

Comments
 (0)