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


def test_CANormalize_inputs():
    input_map = dict(
        args=dict(argstr='%s', ),
        atlas=dict(
            argstr='%s',
            mandatory=True,
            position=-3,
        ),
        control_points=dict(argstr='-c %s', ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        ignore_exception=dict(
            deprecated='1.0.0',
            nohash=True,
            usedefault=True,
        ),
        in_file=dict(
            argstr='%s',
            mandatory=True,
            position=-4,
        ),
        long_file=dict(argstr='-long %s', ),
        mask=dict(argstr='-mask %s', ),
        out_file=dict(
            argstr='%s',
            hash_files=False,
            keep_extension=True,
            name_source=['in_file'],
            name_template='%s_norm',
            position=-1,
        ),
        subjects_dir=dict(),
        terminal_output=dict(
            deprecated='1.0.0',
            nohash=True,
        ),
        transform=dict(
            argstr='%s',
            mandatory=True,
            position=-2,
        ),
    )
    inputs = CANormalize.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_CANormalize_outputs():
    output_map = dict(
        control_points=dict(),
        out_file=dict(),
    )
    outputs = CANormalize.output_spec()

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