8000 Test with Python 3.12 · matplotlib/matplotlib@db5f2d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit db5f2d7

Browse files
committed
Test with Python 3.12
1 parent 0ac170b commit db5f2d7

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ jobs:
7676
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
7777
pyside6-ver: '!=6.5.1'
7878
extra-requirements: '-r requirements/testing/extra.txt'
79+
- os: ubuntu-22.04
80+
python-version: '3.12-dev'
81+
pyside6-ver: '!=6.5.1'
7982
- os: macos-latest
8083
python-version: 3.9
8184
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
@@ -191,8 +194,10 @@ jobs:
191194
python -m pip install --upgrade pip setuptools wheel
192195
193196
# Install pre-release versions during our weekly upcoming dependency tests.
197+
# Also install for 3.12 to get working NumPy (remove when 1.26 is released)
194198
if [[ "${{ github.event_name == 'schedule' &&
195-
matrix.name-suffix != '(Minimum Versions)' }}" = "true" ]]; then
199+
matrix.name-suffix != '(Minimum Versions)' }}" = "true"
200+
|| "${{ matrix.python-version == '3.12-dev'}}" = "true" ]]; then
196201
PRE="--pre"
197202
fi
198203

lib/matplotlib/tests/test_agg.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ def test_pil_kwargs_tiff():
250250

251251

252252
def test_pil_kwargs_webp():
253+
Image.init()
254+
if "WEBP" not in Image.SAVE:
255+
pytest.skip("No WEBP support")
253256
plt.plot([0, 1, 2], [0, 1, 0])
254257
buf_small = io.BytesIO()
255258
pil_kwargs_low = {"quality": 1}
@@ -263,6 +266,9 @@ def test_pil_kwargs_webp():
263266

264267

265268
def test_webp_alpha():
269+
Image.init()
270+
if "WEBP" not in Image.SAVE:
271+
pytest.skip("No WEBP support")
266272
plt.plot([0, 1, 2], [0, 1, 0])
267273
buf = io.BytesIO()
268274
plt.savefig(buf, format="webp", transparent=True)

0 commit comments

Comments
 (0)
0