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


def test_Smooth_inputs():
    input_map = dict(
        args=dict(argstr="%s",),
        environ=dict(nohash=True, usedefault=True,),
        fwhm=dict(
            argstr="-kernel gauss %.03f -fmean",
            mandatory=True,
            position=1,
            xor=["sigma"],
        ),
        in_file=dict(argstr="%s", extensions=None, mandatory=True, position=0,),
        output_type=dict(),
        sigma=dict(
            argstr="-kernel gauss %.03f -fmean",
            mandatory=True,
            position=1,
            xor=["fwhm"],
        ),
        smoothed_file=dict(
            argstr="%s",
            extensions=None,
            hash_files=False,
            name_source=["in_file"],
            name_template="%s_smooth",
            position=2,
        ),
    )
    inputs = Smooth.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_Smooth_outputs():
    output_map = dict(smoothed_file=dict(extensions=None,),)
    outputs = Smooth.output_spec()

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