Skip to content

Make PIL-specific test as knownfailure if PIL is not installed. #945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/matplotlib/tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
import io
import os

try:
from PIL import Image
HAS_PIL = True
except ImportError:
HAS_PIL = False

@image_comparison(baseline_images=['image_interps'])
def test_image_interps():
'make the basic nearest, bilinear and bicubic interps'
Expand Down Expand Up @@ -76,9 +82,10 @@ def test_image_python_io():
buffer.seek(0)
plt.imread(buffer)

@knownfailureif(not HAS_PIL)
def test_imread_pil_uint16():
img = plt.imread(os.path.join(os.path.dirname(__file__),
'baseline_images/test_image/uint16.tif'))
'baseline_images', 'test_image', 'uint16.tif'))
assert (img.dtype == np.uint16)
assert np.sum(img) == 134184960

Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy