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

Commit26adc33

Browse files
committed
Work around leak ofcatch_warnings in PyPy.
https://foss.heptapod.net/pypy/pypy/-/issues/3536
1 parentc3d2833 commit26adc33

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎lib/matplotlib/tests/test_animation.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
importos
22
frompathlibimportPath
3+
importplatform
34
importsubprocess
45
importsys
56
importweakref
@@ -86,6 +87,11 @@ def test_null_movie_writer(anim):
8687

8788
@pytest.mark.parametrize('anim', [dict(klass=dict)],indirect=['anim'])
8889
deftest_animation_delete(anim):
90+
ifplatform.python_implementation()=='PyPy':
91+
# Something in the test setup fixture lingers around into the test and
92+
# breaks pytest.warns on PyPy. Thie garbage collection fixes it.
93+
# https://foss.heptapod.net/pypy/pypy/-/issues/3536
94+
np.testing.break_cycles()
8995
anim=animation.FuncAnimation(**anim)
9096
withpytest.warns(Warning,match='Animation was deleted'):
9197
delanim
@@ -200,6 +206,11 @@ def test_save_animation_smoketest(tmpdir, writer, frame_format, output, anim):
200206
])
201207
@pytest.mark.parametrize('anim', [dict(klass=dict)],indirect=['anim'])
202208
deftest_animation_repr_html(writer,html,want,anim):
209+
ifplatform.python_implementation()=='PyPy':
210+
# Something in the test setup fixture lingers around into the test and
211+
# breaks pytest.warns on PyPy. Thie garbage collection fixes it.
212+
# https://foss.heptapod.net/pypy/pypy/-/issues/3536
213+
np.testing.break_cycles()
203214
if (writer=='imagemagick'andhtml=='html5'
204215
# ImageMagick delegates to ffmpeg for this format.
205216
andnotanimation.FFMpegWriter.isAvailable()):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp