Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9b725bd
Bump the actions group across 1 directory with 2 updates
dependabot[bot] Jan 19, 2026
b9a5ae5
Remove outdated notion of property alias priority from docs.
anntzer Jan 20, 2026
5953dd1
Fix grammar: 'it would better' -> 'it would be better' in comment
bodhisilberling Jan 22, 2026
ec04898
reorg docs to remove misc section, consolidate and cleanup file struc…
story645 Jan 21, 2026
ed0f0f6
widgets.pyi: Add missing RadioButtons.index_selected type hint
doronbehar Dec 1, 2025
e42b312
CheckButtons: rename _checks to _buttons
doronbehar Jan 19, 2026
37aa7f8
*Buttons: use a shared _Buttons class
doronbehar Jan 19, 2026
cdc231f
*Buttons: use a semi-public self._buttons_ys variable
doronbehar Jan 19, 2026
81b2196
*Buttons: share more __init__ functionality
doronbehar Jan 19, 2026
9aae0a8
Fix formatting: add space after # in TODO comment
bodhisilberling Jan 23, 2026
0be344d
move doc build options into tables and tabs
story645 Jan 23, 2026
fce26f5
Remove mutable defaults from tool manager functions
QuLogic Jan 23, 2026
e721843
DOC: Use the old class-based autodoc with Sphinx 9
QuLogic Jan 23, 2026
71b6bf2
DOC: Fix cross-references to new _Buttons class
QuLogic Jan 24, 2026
deec641
FIX: Handle AxesWidget cleanup after failed init (#30935)
larrybradley Jan 24, 2026
f17ca37
TST: Fix warnings from Pillow for unavailable features
QuLogic Jan 22, 2026
9387f36
Speedup normalize_kwargs by storing aliases in a more practical format.
anntzer Jan 23, 2026
6361f6f
Improving error message for width and position type mismatch in viol…
hasanrashid Jan 25, 2026
6bea6f6
DOC: Make grammatical corrections [ci doc]
star1327p Jan 25, 2026
442b53a
DOCS: Fix typo in time array step size comment
vujadinovic Jan 26, 2026
4460ed3
DOC: bring the credits page a little more up-to-date [ci doc]
rcomer Jan 24, 2026
90dd742
Add type hint for fig_kw in subplots (#31033)
sanrishi Jan 27, 2026
6b499a4
mathtext: add support for unicode mathematics fonts
llohse Jan 29, 2026
3d98533
bundle STIX Two Math in tests
llohse Jan 29, 2026
d8bf6d2
inline _is_digit, etc.
llohse Jan 29, 2026
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
Prev Previous commit
Next Next commit
TST: Fix warnings from Pillow for unavailable features
If Pillow is old enough to not support a feature _at all_, then it will
warn about it. If you're running the whole test suite, then something
else seems to cause pytest to treat it as benign. But if you run only
`test_agg.py`, then our `-Werror` setting will cause it to fail test
collection.
  • Loading branch information
QuLogic authored and llohse committed Feb 3, 2026
commit f17ca37dbfa952f89122f6d379b0a1926f6f3834
16 changes: 12 additions & 4 deletions lib/matplotlib/tests/test_agg.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import io
import warnings

import numpy as np
from numpy.testing import assert_array_almost_equal
Expand All @@ -17,6 +18,13 @@
from matplotlib.transforms import IdentityTransform


def require_pillow_feature(name):
with warnings.catch_warnings():
warnings.simplefilter('ignore')
available = features.check(name.lower())
return pytest.mark.skipif(not available, reason=f"{name} support not available")


def test_repeated_save_with_alpha():
# We want an image which has a background color of bluish green, with an
# alpha of 0.25.
Expand Down Expand Up @@ -249,7 +257,7 @@ def test_pil_kwargs_tiff():
assert tags["ImageDescription"] == "test image"


@pytest.mark.skipif(not features.check("webp"), reason="WebP support not available")
@require_pillow_feature('WebP')
def test_pil_kwargs_webp():
plt.plot([0, 1, 2], [0, 1, 0])
buf_small = io.BytesIO()
Expand All @@ -263,7 +271,7 @@ def test_pil_kwargs_webp():
assert buf_large.getbuffer().nbytes > buf_small.getbuffer().nbytes


@pytest.mark.skipif(not features.check("avif"), reason="AVIF support not available")
@require_pillow_feature('AVIF')
def test_pil_kwargs_avif():
plt.plot([0, 1, 2], [0, 1, 0])
buf_small = io.BytesIO()
Expand Down Expand Up @@ -295,7 +303,7 @@ def test_gif_alpha():
assert im.info["transparency"] < len(im.palette.colors)


@pytest.mark.skipif(not features.check("webp"), reason="WebP support not available")
@require_pillow_feature('WebP')
def test_webp_alpha():
plt.plot([0, 1, 2], [0, 1, 0])
buf = io.BytesIO()
Expand All @@ -304,7 +312,7 @@ def test_webp_alpha():
assert im.mode == "RGBA"


@pytest.mark.skipif(not features.check("avif"), reason="AVIF support not available")
@require_pillow_feature('AVIF')
def test_avif_alpha():
plt.plot([0, 1, 2], [0, 1, 0])
buf = io.BytesIO()
Expand Down