We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3de7046 + bf38f8b commit c42441aCopy full SHA for c42441a
lib/matplotlib/tests/test_image.py
@@ -10,6 +10,12 @@
10
import io
11
import os
12
13
+try:
14
+ from PIL import Image
15
+ HAS_PIL = True
16
+except ImportError:
17
+ HAS_PIL = False
18
+
19
@image_comparison(baseline_images=['image_interps'])
20
def test_image_interps():
21
'make the basic nearest, bilinear and bicubic interps'
@@ -76,9 +82,10 @@ def test_image_python_io():
76
82
buffer.seek(0)
77
83
plt.imread(buffer)
78
84
85
+@knownfailureif(not HAS_PIL)
79
86
def test_imread_pil_uint16():
80
87
img = plt.imread(os.path.join(os.path.dirname(__file__),
81
- 'baseline_images/test_image/uint16.tif'))
88
+ 'baseline_images', 'test_image', 'uint16.tif'))
89
assert (img.dtype == np.uint16)
90
assert np.sum(img) == 134184960
91
0 commit comments