@@ -122,11 +122,12 @@ class _ImageComparisonBase:
122
122
This class provides *just* the comparison-related functionality and avoids
123
123
any code that would be specific to any testing framework.
124
124
"""
125
- def __init__ (self , func , tol , remove_text , savefig_kwargs ):
125
+ def __init__ (self , func , tol , remove_text , savefig_kwargs , external_images ):
126
126
self .func = func
127
127
self .result_dir = _results_directory (func )
128
+ print (external_images )
128
129
(self .root_dir , mod_dir , image_list , self .md_path ) = _baseline_directory (
129
- func , os . environ . get ( "MPLTESTIMAGEPATH" , None )
130
+ func , external_images
130
131
)
131
132
self .image_revs = _load_blame (image_list )
132
133
self .baseline_dir = self .root_dir / mod_dir
@@ -293,8 +294,11 @@ def wrapper(*args, extension, request, **kwargs):
293
294
}.get (extension , 'on this system' )
294
295
pytest .skip (f"Cannot compare { extension } files { reason } " )
295
296
296
- img = _ImageComparisonBase (func , tol = tol , remove_text = remove_text ,
297
- savefig_kwargs = savefig_kwargs )
297
+ img = _ImageComparisonBase (
298
+ func ,
299
+ tol = tol , remove_text = remove_text , savefig_kwargs = savefig_kwargs ,
300
+ external_images = request .config .getoption ("--image-baseline" )
301
+ )
298
302
matplotlib .testing .set_font_settings_for_testing ()
299
303
300
304
with _collect_new_figures () as figs :
0 commit comments