Skip to content

Commit a4e3cf3

Browse files
tacaswellQuLogic
andcommitted
TST: adjust test
We no longer just hold onto the savefig kwargs passed in from the user so adjust test to make sure the user values go through rather than simple dictionary equality. Set the rcparam to cover all of the lines added Co-authored-by: Elliott Sales de Andrade <[email protected]>
1 parent 100d004 commit a4e3cf3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/tests/test_animation.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def finish(self):
7070

7171
def test_null_movie_writer(anim):
7272
# Test running an animation with NullMovieWriter.
73+
plt.rcParams["savefig.facecolor"] = "auto"
7374
filename = "unused.null"
7475
dpi = 50
7576
savefig_kwargs = dict(foo=0)
@@ -82,7 +83,10 @@ def test_null_movie_writer(anim):
8283
assert writer.outfile == filename
8384
assert writer.dpi == dpi
8485
assert writer.args == ()
85-
assert writer.savefig_kwargs == savefig_kwargs
86+
# we enrich the savefig kwargs to ensure we composite transparent
87+
# output to an opaque background
88+
for k, v in savefig_kwargs.items():
89+
assert writer.savefig_kwargs[k] == v
8690
assert writer._count == anim.save_count
8791

8892

0 commit comments

Comments
 (0)