Skip to content

Commit 98925f5

Browse files
authored
Skip PILImage tests on Qt5 (#1274)
PIL removed support for Qt 5 in python-pillow/Pillow#8159. This PR skips the `TestPILImage` tests on Qt 5. Related: #1255
1 parent 0a40994 commit 98925f5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pyface/tests/test_pil_image.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,15 @@
1919
except ImportError:
2020
from importlib_resources import as_file, files
2121

22+
from pyface.toolkit import toolkit
2223
from pyface.util._optional_dependencies import optional_import
2324

25+
if toolkit.toolkit in {"qt", "qt4"}:
26+
from pyface.qt import is_qt5
27+
else:
28+
is_qt5 = False
29+
30+
2431
Image = None
2532

2633
with optional_import(
@@ -35,6 +42,7 @@
3542

3643

3744
@unittest.skipIf(Image is None, "Pillow not available")
45+
@unittest.skipIf(is_qt5, "PIL.ImageQt does not support Qt 5")
3846
class TestPILImage(unittest.TestCase):
3947

4048
def test_create_image(self):

0 commit comments

Comments
 (0)