# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.freesurfer.utils import SampleToSurface
def test_SampleToSurface_inputs():
    input_map = dict(reg_file=dict(mandatory=True,
    argstr='--reg %s',
    xor=['reg_file', 'reg_header', 'mni152reg'],
    ),
    sampling_units=dict(),
    vox_file=dict(argstr='--nvox %s',
    ),
    frame=dict(argstr='--frame %d',
    ),
    apply_trans=dict(argstr='--trans %.3f %.3f %.3f',
    ),
    surface=dict(argstr='--surf %s',
    ),
    fix_tk_reg=dict(argstr='--fixtkreg',
    ),
    source_file=dict(mandatory=True,
    argstr='--mov %s',
    ),
    interp_method=dict(argstr='--interp %s',
    ),
    scale_input=dict(argstr='--scale %.3f',
    ),
    reshape_slices=dict(argstr='--rf %d',
    ),
    args=dict(argstr='%s',
    ),
    reshape=dict(xor=['no_reshape'],
    argstr='--reshape',
    ),
    subject_id=dict(),
    sampling_method=dict(xor=['projection_stem'],
    mandatory=True,
    argstr='%s',
    requires=['sampling_range', 'sampling_units'],
    ),
    reg_header=dict(xor=['reg_file', 'reg_header', 'mni152reg'],
    mandatory=True,
    requires=['subject_id'],
    argstr='--regheader %s',
    ),
    hits_file=dict(argstr='--srchit %s',
    ),
    reference_file=dict(argstr='--ref %s',
    ),
    override_reg_subj=dict(requires=['subject_id'],
    argstr='--srcsubject %s',
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    ico_order=dict(requires=['target_subject'],
    argstr='--icoorder %d',
    ),
    hits_type=dict(argstr='--srchit_type',
    ),
    sampling_range=dict(),
    out_type=dict(argstr='--out_type %s',
    ),
    terminal_output=dict(mandatory=True,
    nohash=True,
    ),
    no_reshape=dict(xor=['reshape'],
    argstr='--noreshape',
    ),
    mni152reg=dict(mandatory=True,
    argstr='--mni152reg',
    xor=['reg_file', 'reg_header', 'mni152reg'],
    ),
    smooth_vol=dict(argstr='--fwhm %.3f',
    ),
    subjects_dir=dict(),
    smooth_surf=dict(argstr='--surf-fwhm %.3f',
    ),
    float2int_method=dict(argstr='--float2int %s',
    ),
    hemi=dict(mandatory=True,
    argstr='--hemi %s',
    ),
    surf_reg=dict(requires=['target_subject'],
    argstr='--surfreg',
    ),
    out_file=dict(argstr='--o %s',
    genfile=True,
    ),
    mask_label=dict(xor=['cortex_mask'],
    argstr='--mask %s',
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    projection_stem=dict(xor=['sampling_method'],
    mandatory=True,
    ),
    apply_rot=dict(argstr='--rot %.3f %.3f %.3f',
    ),
    target_subject=dict(argstr='--trgsubject %s',
    ),
    cortex_mask=dict(xor=['mask_label'],
    argstr='--cortex',
    ),
    )
    inputs = SampleToSurface.input_spec()

    for key, metadata in input_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_SampleToSurface_outputs():
    output_map = dict(vox_file=dict(),
    hits_file=dict(),
    out_file=dict(),
    )
    outputs = SampleToSurface.output_spec()

    for key, metadata in output_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(outputs.traits()[key], metakey), value
