Skip to content

Commit 2472bbb

Browse files
effigiesoesteban
authored andcommitted
TEST: Parameterize test
1 parent 51d543d commit 2472bbb

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

fmriprep/workflows/bold/tests/test_util.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
''' Testing module for fmriprep.workflows.base '''
1+
''' Testing module for fmriprep.workflows.bold.util '''
22
import pytest
3+
import os
34

45
import numpy as np
6+
from nipype.utils.filemanip import fname_presuffix
57
from nilearn.image import load_img
68
from ..util import init_bold_reference_wf
79

@@ -16,7 +18,29 @@ def symmetric_overlap(img1, img2):
1618
return overlap / np.sqrt(total1 * total2)
1719

1820

19-
@pytest.skip
21+
@pytest.mark.skipif(not os.getenv('FMRIPREP_REGRESSION_SOURCE') or
22+
not os.getenv('FMRIPREP_REGRESSION_TARGETS'))
23+
@pytest.mark.parametrize('input_name,expected_fname', [
24+
(os.path.join(os.getenv('FMRIPREP_REGRESSION_SOURCE', ''),
25+
base_fname),
26+
fname_presuffix(base_fname, suffix='_mask', use_ext=True,
27+
new_path=os.getenv('FMRIPREP_REGRESSION_TARGETS', '')))
28+
for base_fname in (
29+
'ds000116/sub-12_task-visualoddballwithbuttonresponsetotargetstimuli_run-02_bold.nii.gz',
30+
# 'ds000133/sub-06_ses-post_task-rest_run-01_bold.nii.gz',
31+
# 'ds000140/sub-32_task-heatpainwithregulationandratings_run-02_bold.nii.gz',
32+
# 'ds000157/sub-23_task-passiveimageviewing_bold.nii.gz',
33+
# 'ds000210/sub-06_task-rest_run-01_echo-1_bold.nii.gz',
34+
# 'ds000210/sub-06_task-rest_run-01_echo-2_bold.nii.gz',
35+
# 'ds000210/sub-06_task-rest_run-01_echo-3_bold.nii.gz',
36+
# 'ds000216/sub-03_task-rest_echo-1_bold.nii.gz',
37+
# 'ds000216/sub-03_task-rest_echo-2_bold.nii.gz',
38+
# 'ds000216/sub-03_task-rest_echo-3_bold.nii.gz',
39+
# 'ds000216/sub-03_task-rest_echo-4_bold.nii.gz',
40+
# 'ds000237/sub-03_task-MemorySpan_acq-multiband_run-01_bold.nii.gz',
41+
# 'ds000237/sub-06_task-MemorySpan_acq-multiband_run-01_bold.nii.gz',
42+
)
43+
])
2044
def test_masking(input_fname, expected_fname):
2145
bold_reference_wf = init_bold_reference_wf(enhance_t2=True)
2246
bold_reference_wf.inputs.inputnode.bold_file = input_fname

0 commit comments

Comments
 (0)