|
9 | 9 |
|
10 | 10 | from smriprep.interfaces.tests.data import load as load_test_data
|
11 | 11 |
|
12 |
| -from ..surfaces import init_anat_ribbon_wf, init_gifti_surfaces_wf |
| 12 | +from ..surfaces import _select_seg, init_anat_ribbon_wf, init_gifti_surfaces_wf |
13 | 13 |
|
14 | 14 |
|
15 | 15 | def test_ribbon_workflow(tmp_path: Path):
|
@@ -53,3 +53,16 @@ def test_ribbon_workflow(tmp_path: Path):
|
53 | 53 | assert np.allclose(ribbon.affine, expected.affine)
|
54 | 54 | # Mask data is binary, so we can use np.array_equal
|
55 | 55 | assert np.array_equal(ribbon.dataobj, expected.dataobj)
|
| 56 | + |
| 57 | + |
| 58 | +@pytest.mark.parametrize( |
| 59 | + ('in_files', 'segmentation', 'expected'), |
| 60 | + [ |
| 61 | + ('aparc+aseg.mgz', 'aparc_aseg', 'aparc+aseg.mgz'), |
| 62 | + (['a2009s+aseg.mgz', 'aparc+aseg.mgz'], 'aparc_aseg', 'aparc+aseg.mgz'), |
| 63 | + (['a2009s+aseg.mgz', 'aparc+aseg.mgz'], 'aparc_2009s', 'a2009s+aseg.mgz'), |
| 64 | + ('wmparc.mgz', 'wmparc.mgz', 'wmparc.mgz'), |
| 65 | + ], |
| 66 | +) |
| 67 | +def test_select_seg(in_files, segmentation, expected): |
| 68 | + assert _select_seg(in_files, segmentation) == expected |
0 commit comments