# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..legacy import GenWarpFields


def test_GenWarpFields_inputs():
    input_map = dict(
        args=dict(
            argstr="%s",
        ),
        bias_field_correction=dict(
            argstr="-n 1",
        ),
        dimension=dict(
            argstr="-d %d",
            position=1,
            usedefault=True,
        ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        force_proceed=dict(
            argstr="-f 1",
        ),
        input_image=dict(
            argstr="-i %s",
            copyfile=False,
            extensions=None,
            mandatory=True,
        ),
        inverse_warp_template_labels=dict(
            argstr="-l",
        ),
        max_iterations=dict(
            argstr="-m %s",
            sep="x",
        ),
        num_threads=dict(
            nohash=True,
            usedefault=True,
        ),
        out_prefix=dict(
            argstr="-o %s",
            usedefault=True,
        ),
        quality_check=dict(
            argstr="-q 1",
        ),
        reference_image=dict(
            argstr="-r %s",
            copyfile=True,
            extensions=None,
            mandatory=True,
        ),
        similarity_metric=dict(
            argstr="-s %s",
        ),
        transformation_model=dict(
            argstr="-t %s",
            usedefault=True,
        ),
    )
    inputs = GenWarpFields.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_GenWarpFields_outputs():
    output_map = dict(
        affine_transformation=dict(
            extensions=None,
        ),
        input_file=dict(
            extensions=None,
        ),
        inverse_warp_field=dict(
            extensions=None,
        ),
        output_file=dict(
            extensions=None,
        ),
        warp_field=dict(
            extensions=None,
        ),
    )
    outputs = GenWarpFields.output_spec()

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