# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..preprocess import TSmooth


def test_TSmooth_inputs():
    input_map = dict(
        adaptive=dict(
            argstr="-adaptive %d",
        ),
        args=dict(
            argstr="%s",
        ),
        blackman=dict(
            argstr="-blackman %d",
        ),
        custom=dict(
            argstr="-custom %s",
            extensions=None,
        ),
        datum=dict(
            argstr="-datum %s",
        ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        hamming=dict(
            argstr="-hamming %d",
        ),
        in_file=dict(
            argstr="%s",
            copyfile=False,
            extensions=None,
            mandatory=True,
            position=-1,
        ),
        lin=dict(
            argstr="-lin",
        ),
        lin3=dict(
            argstr="-3lin %d",
        ),
        med=dict(
            argstr="-med",
        ),
        num_threads=dict(
            nohash=True,
            usedefault=True,
        ),
        osf=dict(
            argstr="-osf",
        ),
        out_file=dict(
            argstr="-prefix %s",
            extensions=None,
            name_source="in_file",
            name_template="%s_smooth",
        ),
        outputtype=dict(),
    )
    inputs = TSmooth.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_TSmooth_outputs():
    output_map = dict(
        out_file=dict(
            extensions=None,
        ),
    )
    outputs = TSmooth.output_spec()

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