Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 90a934a

Browse files
authored
Merge pull request #13952 from anntzer/animationtest
TST: Cleanup animation tests.
2 parents f01f6b8 + fd093ef commit 90a934a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/matplotlib/tests/test_animation.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,12 @@ def test_movie_writer_registry():
209209
mpl.rcParams['animation.ffmpeg_path'] = ffmpeg_path
210210

211211

212-
@pytest.mark.skipif(
213-
not animation.writers.is_available(mpl.rcParams["animation.writer"]),
214-
reason="animation writer not installed")
215-
@pytest.mark.parametrize("method_name", ["to_html5_video", "to_jshtml"])
212+
@pytest.mark.parametrize(
213+
"method_name",
214+
[pytest.param("to_html5_video", marks=pytest.mark.skipif(
215+
not animation.writers.is_available(mpl.rcParams["animation.writer"]),
216+
reason="animation writer not installed")),
217+
"to_jshtml"])
216218
def test_embed_limit(method_name, caplog, tmpdir):
217219
caplog.set_level("WARNING")
218220
with tmpdir.as_cwd():
@@ -224,14 +226,12 @@ def test_embed_limit(method_name, caplog, tmpdir):
224226
and record.levelname == "WARNING")
225227

226228

227-
@pytest.mark.skipif(
228-
not animation.writers.is_available(mpl.rcParams["animation.writer"]),
229-
reason="animation writer not installed")
230229
@pytest.mark.parametrize(
231230
"method_name",
232-
["to_html5_video",
233-
pytest.param("to_jshtml",
234-
marks=pytest.mark.xfail)])
231+
[pytest.param("to_html5_video", marks=pytest.mark.skipif(
232+
not animation.writers.is_available(mpl.rcParams["animation.writer"]),
233+
reason="animation writer not installed")),
234+
"to_jshtml"])
235235
def test_cleanup_temporaries(method_name, tmpdir):
236236
with tmpdir.as_cwd():
237237
getattr(make_animation(frames=1), method_name)()

0 commit comments

Comments
 (0)