Skip to content

Commit 34269ab

Browse files
committed
TEST: Update out_file trait and tests to demonstrate default
1 parent 0e02e22 commit 34269ab

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
@@ -2916,7 +2916,8 @@ class MRIsExpandInputSpec(FSTraitedSpec):
29162916
mandatory=True, argstr='%g', position=-2,
29172917
desc='Distance in mm or fraction of cortical thickness')
29182918
out_file = File(
2919-
name_template='%s_expanded', name_source='in_file', position=-1,
2919+
argstr='%s', position=-1,
2920+
name_template='%s.expanded', name_source='in_file',
29202921
desc='Output surface file')
29212922
thickness = traits.Bool(
29222923
argstr='-thickness',
@@ -2937,6 +2938,8 @@ class MRIsExpand(FSCommand):
29372938
>>> from nipype.interfaces.freesurfer import MRIsExpand
29382939
>>> mris_expand = MRIsExpand(thickness=True, distance=0.5)
29392940
>>> mris_expand.inputs.in_file = 'lh.white'
2941+
>>> mris_expand.cmdline # doctest: +ALLOW_UNICODE
2942+
'mris_expand -thickness lh.white 0.5 lh.expanded'
29402943
>>> mris_expand.inputs.out_file = 'lh.graymid'
29412944
>>> mris_expand.cmdline # doctest: +ALLOW_UNICODE
29422945
'mris_expand -thickness lh.white 0.5 lh.graymid'

0 commit comments

Comments
 (0)