Skip to content

Commit b706af8

Browse files
committed
TEST: Thorough test of LaplacianThickness requirement cascade
1 parent 56b2227 commit b706af8

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

nipype/interfaces/ants/tests/test_segmentation.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,18 @@ def test_LaplacianThickness_defaults(change_dir, create_lt):
4242

4343
def test_LaplacianThickness_wrongargs(change_dir, create_lt):
4444
lt = create_lt
45+
lt.inputs.tolerance = 0.001
46+
with pytest.raises(ValueError, match=r".* requires a value for input 'sulcus_prior' .*"):
47+
lt.cmdline
48+
lt.inputs.sulcus_prior = 0.15
49+
with pytest.raises(ValueError, match=r".* requires a value for input 'dT' .*"):
50+
lt.cmdline
51+
lt.inputs.dT = 0.01
52+
with pytest.raises(ValueError, match=r".* requires a value for input 'prior_thickness' .*"):
53+
lt.cmdline
4554
lt.inputs.prior_thickness = 5.9
46-
# 500 must not be placed as smooth_param
47-
assert lt.cmdline != 'LaplacianThickness functional.nii diffusion_weighted.nii functional_thickness.nii 5.9'
48-
# probably should have just raised an exception that "smooth_param"
49-
# should also be defined
55+
with pytest.raises(ValueError, match=r".* requires a value for input 'smooth_param' .*"):
56+
lt.cmdline
57+
lt.inputs.smooth_param = 4.5
58+
assert lt.cmdline == 'LaplacianThickness functional.nii diffusion_weighted.nii ' \
59+
'functional_thickness.nii 4.5 5.9 0.01 0.15 0.001'

0 commit comments

Comments
 (0)