Skip to content

Commit a8f434f

Browse files
authored
Merge pull request #7979 from radarhere/lab
2 parents c3ded3a + e932d9e commit a8f434f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Tests/helper.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,13 @@ def _cached_hopper(mode: str) -> Image.Image:
304304
with pytest.warns(DeprecationWarning):
305305
im = im.convert(mode)
306306
else:
307-
im = im.convert(mode)
307+
try:
308+
im = im.convert(mode)
309+
except ImportError:
310+
if mode == "LAB":
311+
im = Image.open("Tests/images/hopper.Lab.tif")
312+
else:
313+
raise
308314
return im
309315

310316

0 commit comments

Comments
 (0)