MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_null_movie_writer

Function test_null_movie_writer

lib/matplotlib/tests/test_animation.py:84–103  ·  view source on GitHub ↗
(anim)

Source from the content-addressed store, hash-verified

82
83
84def test_null_movie_writer(anim):
85 # Test running an animation with NullMovieWriter.
86 plt.rcParams["savefig.facecolor"] = "auto"
87 filename = "unused.null"
88 dpi = 50
89 savefig_kwargs = dict(foo=0)
90 writer = NullMovieWriter()
91
92 anim.save(filename, dpi=dpi, writer=writer,
93 savefig_kwargs=savefig_kwargs)
94
95 assert writer.fig == plt.figure(1) # The figure used by anim fixture
96 assert writer.outfile == filename
97 assert writer.dpi == dpi
98 assert writer.args == ()
99 # we enrich the savefig kwargs to ensure we composite transparent
100 # output to an opaque background
101 for k, v in savefig_kwargs.items():
102 assert writer.savefig_kwargs[k] == v
103 assert writer._count == anim._save_count
104
105
106@pytest.mark.parametrize('anim', [dict(klass=dict)], indirect=['anim'])

Callers

nothing calls this directly

Calls 3

NullMovieWriterClass · 0.85
saveMethod · 0.80
figureMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…