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


def test_CAT12SANLMDenoising_inputs():
    input_map = dict(
        addnoise=dict(
            field="addnoise",
            usedefault=True,
        ),
        filename_prefix=dict(
            field="prefix",
            usedefault=True,
        ),
        filename_suffix=dict(
            field="suffix",
            usedefault=True,
        ),
        in_files=dict(
            copyfile=False,
            field="data",
            mandatory=True,
        ),
        intlim=dict(
            field="intlim",
            usedefault=True,
        ),
        matlab_cmd=dict(),
        mfile=dict(
            usedefault=True,
        ),
        noisecorr_strength=dict(
            field="nlmfilter.optimized.NCstr",
            usedefault=True,
        ),
        paths=dict(),
        replace_nan_and_inf=dict(
            field="replaceNANandINF",
            usedefault=True,
        ),
        rician=dict(
            field="rician",
            usedefault=True,
        ),
        spm_type=dict(
            field="spm_type",
            usedefault=True,
        ),
        use_mcr=dict(),
        use_v8struct=dict(
            min_ver="8",
            usedefault=True,
        ),
    )
    inputs = CAT12SANLMDenoising.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_CAT12SANLMDenoising_outputs():
    output_map = dict(
        out_file=dict(
            extensions=None,
        ),
    )
    outputs = CAT12SANLMDenoising.output_spec()

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