Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6d585f3

Browse filesBrowse files
committed
savefig kwarg don't use a mutable type as a default argument
1 parent 63733aa commit 6d585f3
Copy full SHA for 6d585f3

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎lib/matplotlib/testing/decorators.py

Copy file name to clipboardExpand all lines: lib/matplotlib/testing/decorators.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def do_test():
167167

168168
def image_comparison(baseline_images=None, extensions=None, tol=1e-3,
169169
freetype_version=None, remove_text=False,
170-
savefig_kwarg=dict()):
170+
savefig_kwarg=None):
171171
"""
172172
call signature::
173173
@@ -213,6 +213,10 @@ def image_comparison(baseline_images=None, extensions=None, tol=1e-3,
213213
# default extensions to test
214214
extensions = ['png', 'pdf', 'svg']
215215

216+
if savefig_kwarg is None:
217+
#default no kwargs to savefig
218+
savefig_kwarg = dict()
219+
216220
def compare_images_decorator(func):
217221
# We want to run the setup function (the actual test function
218222
# that generates the figure objects) only once for each type

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.