Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mdboom merged 2 commits intomatplotlib:masterfrommdboom:test-without-pil
Jun 12, 2012
Merged
Changes fromall 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 deletionlib/matplotlib/tests/test_image.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 DownExpand 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

[8]ページ先頭

©2009-2025 Movatter.jp