Skip to content

Commit 568afaf

Browse files
committed
Fix failing animation test with pytest 6.2.
... per https://docs.pytest.org/en/stable/usage.html#unraisable.
1 parent 7a5458b commit 568afaf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/matplotlib/tests/test_animation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ def test_animation_repr_html(writer, html, want, anim):
197197
html = anim._repr_html_()
198198
if want is None:
199199
assert html is None
200+
with pytest.warns(UserWarning):
201+
del anim # Animtion was never run, so will warn on cleanup.
200202
else:
201203
assert want in html
202204

0 commit comments

Comments
 (0)