@@ -63,8 +63,8 @@ def _download_file(baseline, filename):
63
63
try :
64
64
u = urlopen (base_url + filename )
65
65
content = u .read ()
66
- except Exception :
67
- warnings .warn ('Downloading {0} failed' .format (base_url + filename ))
66
+ except Exception as e :
67
+ warnings .warn ('Downloading {0} failed: {1} ' .format (base_url + filename , e ))
68
68
else :
69
69
break
70
70
else :
@@ -124,7 +124,7 @@ def pytest_configure(config):
124
124
if results_dir is not None and generate_dir is not None :
125
125
warnings .warn ("Ignoring --mpl-result-path since --mpl-generate-path is set" )
126
126
127
- if baseline_dir is not None :
127
+ if baseline_dir is not None and not baseline_dir . startswith (( "https" , "http" )) :
128
128
baseline_dir = os .path .abspath (baseline_dir )
129
129
if generate_dir is not None :
130
130
baseline_dir = os .path .abspath (generate_dir )
@@ -227,10 +227,10 @@ def item_function_wrapper(*args, **kwargs):
227
227
else :
228
228
baseline_dir = self .baseline_dir
229
229
baseline_remote = False
230
- else :
231
- baseline_remote = baseline_dir .startswith (('http://' , 'https://' ))
232
- if not baseline_remote :
233
- baseline_dir = os .path .join (os .path .dirname (item .fspath .strpath ), baseline_dir )
230
+
231
+ baseline_remote = baseline_dir .startswith (('http://' , 'https://' ))
232
+ if not baseline_remote :
233
+ baseline_dir = os .path .join (os .path .dirname (item .fspath .strpath ), baseline_dir )
234
234
235
235
with plt .style .context (style , after_reset = True ), switch_backend (backend ):
236
236
0 commit comments