# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.fsl.preprocess import FIRST

def test_FIRST_inputs():
    input_map = dict(affine_file=dict(argstr='-a %s',
    position=6,
    ),
    args=dict(argstr='%s',
    ),
    brain_extracted=dict(argstr='-b',
    position=2,
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    in_file=dict(argstr='-i %s',
    copyfile=False,
    mandatory=True,
    position=-2,
    ),
    list_of_specific_structures=dict(argstr='-s %s',
    position=5,
    sep=',',
    ),
    method=dict(argstr='-m',
    position=4,
    xor=['method_as_numerical_threshold'],
    ),
    method_as_numerical_threshold=dict(argstr='-m',
    position=4,
    ),
    no_cleanup=dict(argstr='-d',
    position=3,
    ),
    out_file=dict(argstr='-o %s',
    hash_files=False,
    mandatory=True,
    position=-1,
    usedefault=True,
    ),
    output_type=dict(),
    terminal_output=dict(mandatory=True,
    nohash=True,
    ),
    verbose=dict(argstr='-v',
    position=1,
    ),
    )
    inputs = FIRST.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_FIRST_outputs():
    output_map = dict(bvars=dict(),
    original_segmentations=dict(),
    segmentation_file=dict(),
    vtk_surfaces=dict(),
    )
    outputs = FIRST.output_spec()

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

