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


def test_MotionOutliers_inputs():
    input_map = dict(args=dict(argstr='%s',
    ),
    dummy=dict(argstr='--dummy=%d',
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    in_file=dict(argstr='-i %s',
    mandatory=True,
    ),
    mask=dict(argstr='-m %s',
    ),
    metric=dict(argstr='--%s',
    ),
    no_motion_correction=dict(argstr='--nomoco',
    ),
    out_file=dict(argstr='-o %s',
    hash_files=False,
    keep_extension=True,
    name_source='in_file',
    name_template='%s_outliers.txt',
    ),
    out_metric_plot=dict(argstr='-p %s',
    hash_files=False,
    keep_extension=True,
    name_source='in_file',
    name_template='%s_metrics.png',
    ),
    out_metric_values=dict(argstr='-s %s',
    hash_files=False,
    keep_extension=True,
    name_source='in_file',
    name_template='%s_metrics.txt',
    ),
    output_type=dict(),
    terminal_output=dict(nohash=True,
    ),
    threshold=dict(argstr='--thresh=%g',
    ),
    )
    inputs = MotionOutliers.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_MotionOutliers_outputs():
    output_map = dict(out_file=dict(),
    out_metric_plot=dict(),
    out_metric_values=dict(),
    )
    outputs = MotionOutliers.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
