Skip to content

Commit cdaf422

Browse files
committed
TEST: Update out_file trait and tests to demonstrate default
1 parent 1afd65e commit cdaf422

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

nipype/interfaces/freesurfer/tests/test_auto_MRIsExpand.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ def test_MRIsExpand_inputs():
2020
mandatory=True,
2121
position=-3,
2222
),
23-
out_file=dict(name_source='in_file',
24-
name_template='%s_expanded',
23+
out_file=dict(argstr='%s',
24+
name_source='in_file',
25+
name_template='%s.expanded',
2526
position=-1,
2627
),
2728
subjects_dir=dict(),

nipype/interfaces/freesurfer/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2889,7 +2889,8 @@ class MRIsExpandInputSpec(FSTraitedSpec):
28892889
mandatory=True, argstr='%g', position=-2,
28902890
desc='Distance in mm or fraction of cortical thickness')
28912891
out_file = File(
2892-
name_template='%s_expanded', name_source='in_file', position=-1,
2892+
argstr='%s', position=-1,
2893+
name_template='%s.expanded', name_source='in_file',
28932894
desc='Output surface file')
28942895
thickness = traits.Bool(
28952896
argstr='-thickness',
@@ -2910,6 +2911,8 @@ class MRIsExpand(FSCommand):
29102911
>>> from nipype.interfaces.freesurfer import MRIsExpand
29112912
>>> mris_expand = MRIsExpand(thickness=True, distance=0.5)
29122913
>>> mris_expand.inputs.in_file = 'lh.white'
2914+
>>> mris_expand.cmdline # doctest: +ALLOW_UNICODE
2915+
'mris_expand -thickness lh.white 0.5 lh.expanded'
29132916
>>> mris_expand.inputs.out_file = 'lh.graymid'
29142917
>>> mris_expand.cmdline # doctest: +ALLOW_UNICODE
29152918
'mris_expand -thickness lh.white 0.5 lh.graymid'

0 commit comments

Comments
 (0)