File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ def switch_backend(backend):
143
143
yield
144
144
145
145
146
- def _close_figure (fig ):
146
+ def close_mpl_figure (fig ):
147
147
"Close a given matplotlib Figure. Any other type of figure is ignored"
148
148
149
149
import matplotlib .pyplot as plt
@@ -244,7 +244,7 @@ def item_function_wrapper(*args, **kwargs):
244
244
test_image = os .path .abspath (os .path .join (result_dir , filename ))
245
245
246
246
fig .savefig (test_image , ** savefig_kwargs )
247
- _close_figure (fig )
247
+ close_mpl_figure (fig )
248
248
249
249
# Find path to baseline image
250
250
if baseline_remote :
@@ -275,7 +275,7 @@ def item_function_wrapper(*args, **kwargs):
275
275
os .makedirs (self .generate_dir )
276
276
277
277
fig .savefig (os .path .abspath (os .path .join (self .generate_dir , filename )), ** savefig_kwargs )
278
- _close_figure (fig )
278
+ close_mpl_figure (fig )
279
279
pytest .skip ("Skipping test, since generating data" )
280
280
281
281
if item .cls is not None :
@@ -312,7 +312,7 @@ def item_function_wrapper(*args, **kwargs):
312
312
else : # function
313
313
fig = original (* args , ** kwargs )
314
314
315
- _close_figure (fig )
315
+ close_mpl_figure (fig )
316
316
317
317
if item .cls is not None :
318
318
setattr (item .cls , item .function .__name__ , item_function_wrapper )
You can’t perform that action at this time.
0 commit comments