File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -379,7 +379,9 @@ def test_make_doc_plots(self):
379379 plot_convergence : dict (yscale = 'log' , true_minimum = 0 ),
380380 plot_objective : dict (resolution = 12 )
381381 }
382- with chdir (Path (__file__ ).parent .parent / 'www' ):
382+ www_dir = Path (__file__ ).parent .parent / 'www'
383+ www_dir .mkdir (exist_ok = True )
384+ with chdir (www_dir ):
383385 for plot_func in PLOT_FUNCS :
384386 name = plot_func .__name__ .removeprefix ("plot_" )
385387 with self .subTest (plot = name ):
@@ -419,7 +421,9 @@ def evaluate(x):
419421 results .append (result )
420422 named_results = [(f'estimator={ e !r} ' , r ) for e , r in zip (BUILTIN_ESTIMATORS , results )]
421423 fig = plot_convergence (* named_results , true_minimum = 0 )
422- with chdir (Path (__file__ ).parent .parent / 'www' ):
424+ www_dir = Path (__file__ ).parent .parent / 'www'
425+ www_dir .mkdir (exist_ok = True )
426+ with chdir (www_dir ):
423427 fig .savefig ('convergence2.svg' )
424428 plt .show ()
425429
You can’t perform that action at this time.
0 commit comments