# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..utils import SH2Amp


def test_SH2Amp_inputs():
    input_map = dict(
        args=dict(
            argstr="%s",
        ),
        directions=dict(
            argstr="%s",
            extensions=None,
            mandatory=True,
            position=-2,
        ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        in_file=dict(
            argstr="%s",
            extensions=None,
            mandatory=True,
            position=-3,
        ),
        nonnegative=dict(
            argstr="-nonnegative",
        ),
        out_file=dict(
            argstr="%s",
            extensions=None,
            name_source=["in_file"],
            name_template="%s_amp.mif",
            position=-1,
            usedefault=True,
        ),
    )
    inputs = SH2Amp.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_SH2Amp_outputs():
    output_map = dict(
        out_file=dict(
            extensions=None,
        ),
    )
    outputs = SH2Amp.output_spec()

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