@@ -310,9 +310,9 @@ def item_function_wrapper(*args, **kwargs):
310
310
311
311
# Save the figure
312
312
result_dir = tempfile .mkdtemp ()
313
- test_array = os .path .abspath (os .path .join (result_dir , filename ))
313
+ filepath = os .path .abspath (os .path .join (result_dir , filename ))
314
314
315
- FORMATS [file_format ].write (test_array , array , ** write_kwargs )
315
+ FORMATS [file_format ].write (filepath , array , ** write_kwargs )
316
316
317
317
# Find path to baseline array
318
318
if baseline_remote :
@@ -325,22 +325,22 @@ def item_function_wrapper(*args, **kwargs):
325
325
Generated file:
326
326
\t {test}
327
327
This is expected for new tests.""" .format (
328
- test = test_array ))
328
+ test = filepath ))
329
329
330
330
# distutils may put the baseline arrays in non-accessible places,
331
331
# copy to our tmpdir to be sure to keep them in case of failure
332
332
baseline_file = os .path .abspath (os .path .join (result_dir , 'reference-' + filename ))
333
333
shutil .copyfile (baseline_file_ref , baseline_file )
334
334
335
- identical , msg = FORMATS [file_format ].compare (baseline_file , test_array , atol = atol , rtol = rtol )
335
+ identical , msg = FORMATS [file_format ].compare (baseline_file , filepath , atol = atol , rtol = rtol )
336
336
337
337
if identical :
338
338
shutil .rmtree (result_dir )
339
339
else :
340
340
raise Exception (msg )
341
341
342
342
else :
343
-
343
+ 1 / 0
344
344
if not os .path .exists (self .generate_dir ):
345
345
os .makedirs (self .generate_dir )
346
346
0 commit comments