Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c42441a

Browse filesBrowse files
committed
Merge pull request #945 from mdboom/test-without-pil
Make PIL-specific test as knownfailure if PIL is not installed.
2 parents 3de7046 + bf38f8b commit c42441a
Copy full SHA for c42441a

File tree

Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed

‎lib/matplotlib/tests/test_image.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_image.py
+8-1Lines changed: 8 additions & 1 deletion
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,9 +82,10 @@ 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__),
81-
'baseline_images/test_image/uint16.tif'))
88+
'baseline_images', 'test_image', 'uint16.tif'))
8289
assert (img.dtype == np.uint16)
8390
assert np.sum(img) == 134184960
8491

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.