We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 075fa7e commit b147981Copy full SHA for b147981
niworkflows/tests/test_viz.py
@@ -140,7 +140,7 @@ def test_fmriplot(input_files):
140
_cifti_timeseries(in_file)
141
)
142
143
- fMRIPlot(
+ fig = fMRIPlot(
144
timeseries,
145
segments,
146
tr=_get_tr(nb.load(in_file)),
@@ -151,10 +151,12 @@ def test_fmriplot(input_files):
151
}),
152
units={"FD": "mm"},
153
paired_carpet=dtype == "cifti",
154
- ).plot().savefig(
155
- os.path.join(save_artifacts, f"fmriplot_{dtype}{has_seg}.svg"),
156
- bbox_inches="tight",
157
- )
+ ).plot()
+ if save_artifacts:
+ fig.savefig(
+ os.path.join(save_artifacts, f"fmriplot_{dtype}{has_seg}.svg"),
158
+ bbox_inches="tight",
159
+ )
160
161
162
def test_plot_melodic_components(tmp_path):
0 commit comments