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

Class NullMovieWriter

lib/matplotlib/tests/test_animation.py:55–81  ·  view source on GitHub ↗

A minimal MovieWriter. It doesn't actually write anything. It just saves the arguments that were given to the setup() and grab_frame() methods as attributes, and counts how many times grab_frame() is called. This class doesn't have an __init__ method with the appropriate s

Source from the content-addressed store, hash-verified

53
54
55class NullMovieWriter(animation.AbstractMovieWriter):
56 """
57 A minimal MovieWriter. It doesn't actually write anything.
58 It just saves the arguments that were given to the setup() and
59 grab_frame() methods as attributes, and counts how many times
60 grab_frame() is called.
61
62 This class doesn't have an __init__ method with the appropriate
63 signature, and it doesn't define an isAvailable() method, so
64 it cannot be added to the 'writers' registry.
65 """
66
67 def setup(self, fig, outfile, dpi, *args):
68 self.fig = fig
69 self.outfile = outfile
70 self.dpi = dpi
71 self.args = args
72 self._count = 0
73
74 def grab_frame(self, **savefig_kwargs):
75 from matplotlib.animation import _validate_grabframe_kwargs
76 _validate_grabframe_kwargs(savefig_kwargs)
77 self.savefig_kwargs = savefig_kwargs
78 self._count += 1
79
80 def finish(self):
81 pass
82
83
84def test_null_movie_writer(anim):

Callers 3

test_null_movie_writerFunction · 0.85
test_no_length_framesFunction · 0.85

Calls

no outgoing calls

Tested by 3

test_null_movie_writerFunction · 0.68
test_no_length_framesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…