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 234f08a

Browse filesBrowse files
authored
Merge pull request #28788 from greglucas/webp-test-skip
TST: Skip webp tests if it isn't available
2 parents 5461ae2 + a809c64 commit 234f08a
Copy full SHA for 234f08a

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎lib/matplotlib/tests/test_agg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_agg.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import numpy as np
44
from numpy.testing import assert_array_almost_equal
5-
from PIL import Image, TiffTags
5+
from PIL import features, Image, TiffTags
66
import pytest
77

88

@@ -249,6 +249,7 @@ def test_pil_kwargs_tiff():
249249
assert tags["ImageDescription"] == "test image"
250250

251251

252+
@pytest.mark.skipif(not features.check("webp"), reason="WebP support not available")
252253
def test_pil_kwargs_webp():
253254
plt.plot([0, 1, 2], [0, 1, 0])
254255
buf_small = io.BytesIO()
@@ -262,6 +263,7 @@ def test_pil_kwargs_webp():
262263
assert buf_large.getbuffer().nbytes > buf_small.getbuffer().nbytes
263264

264265

266+
@pytest.mark.skipif(not features.check("webp"), reason="WebP support not available")
265267
def test_webp_alpha():
266268
plt.plot([0, 1, 2], [0, 1, 0])
267269
buf = io.BytesIO()

0 commit comments

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