From f8758ebb346fd653b969b2375705ada525c11c09 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 9 Jul 2018 00:27:08 -0400 Subject: [PATCH] TST: Place animation files in a temp dir. --- lib/matplotlib/tests/test_animation.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/tests/test_animation.py b/lib/matplotlib/tests/test_animation.py index 54bca6d3553a..7b9fc1e4a69f 100644 --- a/lib/matplotlib/tests/test_animation.py +++ b/lib/matplotlib/tests/test_animation.py @@ -215,9 +215,10 @@ def test_movie_writer_registry(): not animation.writers.is_available(mpl.rcParams["animation.writer"]), reason="animation writer not installed") @pytest.mark.parametrize("method_name", ["to_html5_video", "to_jshtml"]) -def test_embed_limit(method_name, caplog): - with mpl.rc_context({"animation.embed_limit": 1e-6}): # ~1 byte. - getattr(make_animation(frames=1), method_name)() +def test_embed_limit(method_name, caplog, tmpdir): + with tmpdir.as_cwd(): + with mpl.rc_context({"animation.embed_limit": 1e-6}): # ~1 byte. + getattr(make_animation(frames=1), method_name)() assert len(caplog.records) == 1 record, = caplog.records assert (record.name == "matplotlib.animation"