# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.spm.preprocess import NewSegment
def test_NewSegment_inputs():
    input_map = dict(ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    paths=dict(),
    write_deformation_fields=dict(field='warp.write',
    ),
    tissues=dict(field='tissue',
    ),
    sampling_distance=dict(field='warp.samp',
    ),
    use_v8struct=dict(min_ver='8',
    usedefault=True,
    ),
    warping_regularization=dict(field='warp.reg',
    ),
    use_mcr=dict(),
    affine_regularization=dict(field='warp.affreg',
    ),
    channel_files=dict(copyfile=False,
    mandatory=True,
    field='channel',
    ),
    mfile=dict(usedefault=True,
    ),
    matlab_cmd=dict(),
    channel_info=dict(field='channel',
    ),
    )
    inputs = NewSegment.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_NewSegment_outputs():
    output_map = dict(modulated_class_images=dict(),
    normalized_class_images=dict(),
    bias_field_images=dict(),
    bias_corrected_images=dict(),
    inverse_deformation_field=dict(),
    dartel_input_images=dict(),
    transformation_mat=dict(),
    native_class_images=dict(),
    forward_deformation_field=dict(),
    )
    outputs = NewSegment.output_spec()

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