# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ...testing import assert_equal
from ..misc import TSNR


def test_TSNR_inputs():
    input_map = dict(detrended_file=dict(hash_files=False,
    usedefault=True,
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    in_file=dict(mandatory=True,
    ),
    mean_file=dict(hash_files=False,
    usedefault=True,
    ),
    regress_poly=dict(),
    stddev_file=dict(hash_files=False,
    usedefault=True,
    ),
    tsnr_file=dict(hash_files=False,
    usedefault=True,
    ),
    )
    inputs = TSNR.input_spec()

    for key, metadata in list(input_map.items()):
        for metakey, value in list(metadata.items()):
            yield assert_equal, getattr(inputs.traits()[key], metakey), value


def test_TSNR_outputs():
    output_map = dict(detrended_file=dict(),
    mean_file=dict(),
    stddev_file=dict(),
    tsnr_file=dict(),
    )
    outputs = TSNR.output_spec()

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