@@ -118,35 +118,22 @@ def mock_session_list(*args, **kwargs):
118
118
def test_pet_report (tmp_path , monkeypatch ):
119
119
fake_uuid = 'fake_uuid'
120
120
121
- pet_source = data_dir / 'work/ reportlets/ petprep'
121
+ pet_source = data_dir / 'work' / ' reportlets' / ' petprep' / 'sub-01 '
122
122
sub_dir = tmp_path / 'sub-01' / 'figures'
123
123
sub_dir .mkdir (parents = True )
124
124
125
- shutil .copy2 (
126
- pet_source / 'sub-01/sub-01_desc-about_T1w.html' , sub_dir / 'sub-01_desc-about_T1w.html'
127
- )
128
- shutil .copy2 (
129
- pet_source / 'sub-01/sub-01_desc-summary_pet.html' ,
130
- sub_dir / 'sub-01_desc-summary_pet.html' ,
131
- )
132
- shutil .copy2 (
133
- pet_source / 'sub-01/sub-01_desc-validation_pet.html' ,
134
- sub_dir / 'sub-01_desc-validation_pet.html' ,
135
- )
136
- shutil .copy2 (
137
- pet_source / 'sub-01/sub-01_desc-carpetplot_pet.svg' ,
138
- sub_dir / 'sub-01_desc-carpetplot_pet.svg' ,
139
- )
140
- shutil .copy2 (
141
- pet_source / 'sub-01/sub-01_desc-confoundcorr_pet.svg' ,
142
- sub_dir / 'sub-01_desc-confoundcorr_pet.svg' ,
143
- )
144
- shutil .copy2 (
145
- pet_source / 'sub-01/sub-01_desc-coreg_pet.svg' , sub_dir / 'sub-01_desc-coreg_pet.svg'
146
- )
147
-
148
- config .execution .aggr_ses_reports = 4
149
- config .execution .layout = BIDSLayout (data_dir / 'ds000005' )
125
+ for fl in [
126
+ 'sub-01_desc-about_T1w.html' ,
127
+ 'sub-01_desc-summary_pet.html' ,
128
+ 'sub-01_desc-validation_pet.html' ,
129
+ 'sub-01_desc-carpetplot_pet.svg' ,
130
+ 'sub-01_desc-confoundcorr_pet.svg' ,
131
+ 'sub-01_desc-coreg_pet.svg' ,
132
+ ]:
133
+ shutil .copy2 (pet_source / fl , sub_dir / fl )
134
+
135
+ monkeypatch .setattr (config .execution , 'aggr_ses_reports' , 4 )
136
+ monkeypatch .setattr (config .execution , 'layout' , BIDSLayout (data_dir / 'ds000005' ))
150
137
monkeypatch .setattr (config .execution , 'bids_filters' , {'pet' : {'session' : ['baseline' ]}})
151
138
152
139
failed_reports = generate_reports (['01' ], tmp_path , fake_uuid )
0 commit comments