|
1 | 1 | importos
|
2 | 2 | frompathlibimportPath
|
| 3 | +importplatform |
3 | 4 | importsubprocess
|
4 | 5 | importsys
|
5 | 6 | importweakref
|
@@ -86,6 +87,11 @@ def test_null_movie_writer(anim):
|
86 | 87 |
|
87 | 88 | @pytest.mark.parametrize('anim', [dict(klass=dict)],indirect=['anim'])
|
88 | 89 | 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() |
89 | 95 | anim=animation.FuncAnimation(**anim)
|
90 | 96 | withpytest.warns(Warning,match='Animation was deleted'):
|
91 | 97 | delanim
|
@@ -200,6 +206,11 @@ def test_save_animation_smoketest(tmpdir, writer, frame_format, output, anim):
|
200 | 206 | ])
|
201 | 207 | @pytest.mark.parametrize('anim', [dict(klass=dict)],indirect=['anim'])
|
202 | 208 | 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() |
203 | 214 | if (writer=='imagemagick'andhtml=='html5'
|
204 | 215 | # ImageMagick delegates to ffmpeg for this format.
|
205 | 216 | andnotanimation.FFMpegWriter.isAvailable()):
|
|