8000 Make PIL-specific test as knownfailure if PIL is not installed. · matplotlib/matplotlib@51c2b2c · GitHub
[go: up one dir, main page]

Skip to content

Commit 51c2b2c

Browse files
committed
Make PIL-specific test as knownfailure if PIL is not installed.
1 parent 45493c4 commit 51c2b2c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/tests/test_image.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
import io
1111
import os
1212

13+
try:
14+
from PIL import Image
15+
HAS_PIL = True
16+
except ImportError:
17+
HAS_PIL = False
18+
1319
@image_comparison(baseline_images=['image_interps'])
1420
def test_image_interps():
1521
'make the basic nearest, bilinear and bicubic interps'
@@ -76,6 +82,7 @@ def test_image_python_io():
7682
buffer.seek(0)
7783
plt.imread(buffer)
7884

85+
@knownfailureif(not HAS_PIL)
7986
def test_imread_pil_uint16():
8087
img = plt.imread(os.path.join(os.path.dirname(__file__),
8188
'baseline_images/test_image/uint16.tif'))

0 commit comments

Comments
 (0)
0