Skip to content

Commit 1568f0c

Browse files
committed
test: be more specific about QtWidgets import
When PyQt6 is uninstalled, it is still importable, but `PyQt6.QtWidgets` is no longer available.
1 parent 7f4f993 commit 1568f0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/tests/io/test_clipboard.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def test_stringify_text(text):
177177
("qtpy.QtWidgets", "QApplication"),
178178
marks=[
179179
pytest.mark.xfail(
180-
importlib.util.find_spec("qtpy") is None,
180+
importlib.util.find_spec("qtpy.QtWidgets") is None,
181181
reason="qtpy isn't installed",
182182
)
183183
],
@@ -186,7 +186,7 @@ def test_stringify_text(text):
186186
("PyQt6.QtWidgets", "QApplication"),
187187
marks=[
188188
pytest.mark.xfail(
189-
importlib.util.find_spec("PyQt6") is None,
189+
importlib.util.find_spec("PyQt6.QtWidgets") is None,
190190
reason="PyQt6 isn't installed",
191191
)
192192
],
@@ -195,7 +195,7 @@ def test_stringify_text(text):
195195
("PyQt5.QtWidgets", "QApplication"),
196196
marks=[
197197
pytest.mark.xfail(
198-
importlib.util.find_spec("PyQt5") is None,
198+
importlib.util.find_spec("PyQt5.QtWidgets") is None,
199199
reason="PyQt5 isn't installed",
200200
)
201201
],

0 commit comments

Comments
 (0)