11import pytest
2+
23from CPAC .registration .registration import FSL_registration_connector
34
4- @pytest .mark .parametrize ("sink_native_transforms" , ['On' , 'Off' ])
5+
6+ @pytest .mark .parametrize ("sink_native_transforms" , ["On" , "Off" ])
57def test_fsl_registration_connector (sink_native_transforms ):
6- wf_name = ' test_fsl_registration_connector'
8+ wf_name = " test_fsl_registration_connector"
79 cfg = {
8- ' registration-workflows' : {' sink_native_transforms' : sink_native_transforms },
10+ " registration-workflows" : {" sink_native_transforms" : sink_native_transforms },
911 }
1012 _ , outputs = FSL_registration_connector (wf_name , cfg )
11- if sink_native_transforms == 'On' :
13+ if sink_native_transforms == "On" :
1214 expected_outputs = {
13- ' from-T1w_to-template_mode-image_desc-linear_xfm' ,
14- ' from-template_to-T1w_mode-image_desc-linear_xfm'
15+ " from-T1w_to-template_mode-image_desc-linear_xfm" ,
16+ " from-template_to-T1w_mode-image_desc-linear_xfm" ,
1517 }
16- assert expected_outputs .issubset (outputs . keys ()), (
17- f"Expected outputs { expected_outputs } not found in { outputs .keys ()} "
18- )
18+ assert expected_outputs .issubset (
19+ outputs .keys ()
20+ ), f"Expected outputs { expected_outputs } not found in { outputs . keys () } "
1921 else :
2022 # Adjust this set based on what outputs should be present when 'Off'
2123 not_expected_outputs = {
22- ' from-T1w_to-template_mode-image_desc-linear_xfm' ,
23- ' from-template_to-T1w_mode-image_desc-linear_xfm'
24+ " from-T1w_to-template_mode-image_desc-linear_xfm" ,
25+ " from-template_to-T1w_mode-image_desc-linear_xfm" ,
2426 }
25- assert not not_expected_outputs .intersection (outputs . keys ()), (
26- f"Outputs { not_expected_outputs } should not be present when sink_native_transforms is Off"
27- )
27+ assert not not_expected_outputs .intersection (
28+ outputs . keys ()
29+ ), f"Outputs { not_expected_outputs } should not be present when sink_native_transforms is Off"
0 commit comments