8000 Make PIL-specific test as knownfailure if PIL is not installed. by mdboom · Pull Request #945 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

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 1 commit
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
Next Next commit
Make PIL-specific test as knownfailure if PIL is not installed.
  • Loading branch information
mdboom committed Jun 11, 2012
commit 51c2b2c9a616c951355317d7d247cf687f71ecb1
7 changes: 7 additions & 0 deletions 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,6 +82,7 @@ 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'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While your there, would you mind replacing the slashes by using path.join?

Expand Down
0