File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
niworkflows/reports/tests Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 9
9
10
10
import matplotlib .pyplot as plt
11
11
from bids .layout .writing import build_path
12
+ from bids .layout import BIDSLayout
12
13
13
14
import pytest
14
15
@@ -204,9 +205,12 @@ def test_generated_reportlets(bids_sessions, ordering):
204
205
needed_entities = ['session' , 'task' , 'ceagent' , 'run' ]
205
206
# the last section is the most recently run
206
207
reportlets_num = len (report .sections [- 1 ].reportlets )
208
+ # get the number of figures in the output directory
209
+ out_layout = BIDSLayout (out_dir , config = 'figures' , validate = False )
210
+ out_figs = len (out_layout .get ())
207
211
# if ordering does not contain all the relevent entities
208
212
# then there should be fewer reportlets than expected
209
213
if all (ent in ordering for ent in needed_entities ):
210
- assert reportlets_num == expected_reportlets_num
214
+ assert reportlets_num == expected_reportlets_num == out_figs
211
215
else :
212
- assert reportlets_num < expected_reportlets_num
216
+ assert reportlets_num < expected_reportlets_num == out_figs
You can’t perform that action at this time.
0 commit comments