File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
ch08NPRefinement/solutions/diffpy-cmi
ch11ClusterXYZ/solutions/diffpy-cmi Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -447,10 +447,6 @@ def plot_results(recipe, fig_name):
447447
448448 # Change some style details of the plot
449449 mpl .rcParams .update (mpl .rcParamsDefault )
450- if (PWD .parent .parent .parent / "utils" / "billinge.mplstyle" ).exists ():
451- plt .style .use (
452- str (PWD .parent .parent .parent / "utils" / "billinge.mplstyle" )
453- )
454450
455451 # Create a figure and an axis on which to plot
456452 fig , ax1 = plt .subplots (1 , 1 )
Original file line number Diff line number Diff line change @@ -199,9 +199,6 @@ def plot_results(recipe, figname):
199199 diff = g - gcalc + diffzero
200200
201201 mpl .rcParams .update (mpl .rcParamsDefault )
202- plt .style .use (
203- str (PWD .parent .parent .parent / "utils" / "billinge.mplstyle" )
204- )
205202
206203 fig , ax1 = plt .subplots (1 , 1 )
207204
Original file line number Diff line number Diff line change 44import shutil
55from pathlib import Path
66
7+ import matplotlib
78import pytest
89
910PROJECT_ROOT = Path (__file__ ).resolve ().parents [1 ]
@@ -23,6 +24,12 @@ def tmp_examples(tmp_path_factory):
2324 yield tmp_examples
2425
2526
27+ @pytest .fixture (scope = "session" , autouse = True )
28+ def use_headless_matplotlib ():
29+ """Force matplotlib to use a headless backend during tests."""
30+ matplotlib .use ("Agg" )
31+
32+
2633@pytest .fixture
2734def user_filesystem (tmp_path ):
2835 base_dir = Path (tmp_path )
You can’t perform that action at this time.
0 commit comments