# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..model import Label2Vol


def test_Label2Vol_inputs():
    input_map = dict(
        annot_file=dict(
            argstr='--annot %s',
            copyfile=False,
            extensions=None,
            mandatory=True,
            requires=('subject_id', 'hemi'),
            xor=('label_file', 'annot_file', 'seg_file', 'aparc_aseg'),
        ),
        aparc_aseg=dict(
            argstr='--aparc+aseg',
            mandatory=True,
            xor=('label_file', 'annot_file', 'seg_file', 'aparc_aseg'),
        ),
        args=dict(argstr='%s', ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        fill_thresh=dict(argstr='--fillthresh %g', ),
        hemi=dict(argstr='--hemi %s', ),
        identity=dict(
            argstr='--identity',
            xor=('reg_file', 'reg_header', 'identity'),
        ),
        invert_mtx=dict(argstr='--invertmtx', ),
        label_file=dict(
            argstr='--label %s...',
            copyfile=False,
            mandatory=True,
            xor=('label_file', 'annot_file', 'seg_file', 'aparc_aseg'),
        ),
        label_hit_file=dict(
            argstr='--hits %s',
            extensions=None,
        ),
        label_voxel_volume=dict(argstr='--labvoxvol %f', ),
        map_label_stat=dict(
            argstr='--label-stat %s',
            extensions=None,
        ),
        native_vox2ras=dict(argstr='--native-vox2ras', ),
        proj=dict(
            argstr='--proj %s %f %f %f',
            requires=('subject_id', 'hemi'),
        ),
        reg_file=dict(
            argstr='--reg %s',
            extensions=None,
            xor=('reg_file', 'reg_header', 'identity'),
        ),
        reg_header=dict(
            argstr='--regheader %s',
            extensions=None,
            xor=('reg_file', 'reg_header', 'identity'),
        ),
        seg_file=dict(
            argstr='--seg %s',
            copyfile=False,
            extensions=None,
            mandatory=True,
            xor=('label_file', 'annot_file', 'seg_file', 'aparc_aseg'),
        ),
        subject_id=dict(argstr='--subject %s', ),
        subjects_dir=dict(),
        surface=dict(argstr='--surf %s', ),
        template_file=dict(
            argstr='--temp %s',
            extensions=None,
            mandatory=True,
        ),
        vol_label_file=dict(
            argstr='--o %s',
            extensions=None,
            genfile=True,
        ),
    )
    inputs = Label2Vol.input_spec()

    for key, metadata in list(input_map.items()):
        for metakey, value in list(metadata.items()):
            assert getattr(inputs.traits()[key], metakey) == value
def test_Label2Vol_outputs():
    output_map = dict(vol_label_file=dict(extensions=None, ), )
    outputs = Label2Vol.output_spec()

    for key, metadata in list(output_map.items()):
        for metakey, value in list(metadata.items()):
            assert getattr(outputs.traits()[key], metakey) == value
