# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.rapidart import ArtifactDetect
def test_ArtifactDetect_inputs():
    input_map = dict(ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    plot_type=dict(usedefault=True,
    ),
    mask_type=dict(mandatory=True,
    ),
    mask_threshold=dict(),
    parameter_source=dict(mandatory=True,
    ),
    translation_threshold=dict(mandatory=True,
    xor=['norm_threshold'],
    ),
    global_threshold=dict(usedefault=True,
    ),
    bound_by_brainmask=dict(usedefault=True,
    ),
    realigned_files=dict(mandatory=True,
    ),
    rotation_threshold=dict(mandatory=True,
    xor=['norm_threshold'],
    ),
    save_plot=dict(usedefault=True,
    ),
    use_differences=dict(minlen=2,
    maxlen=2,
    usedefault=True,
    ),
    norm_threshold=dict(mandatory=True,
    xor=['rotation_threshold', 'translation_threshold'],
    ),
    zintensity_threshold=dict(mandatory=True,
    ),
    use_norm=dict(requires=['norm_threshold'],
    usedefault=True,
    ),
    mask_file=dict(),
    intersect_mask=dict(),
    realignment_parameters=dict(mandatory=True,
    ),
    )
    inputs = ArtifactDetect.input_spec()

    for key, metadata in input_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_ArtifactDetect_outputs():
    output_map = dict(displacement_files=dict(),
    outlier_files=dict(),
    mask_files=dict(),
    intensity_files=dict(),
    norm_files=dict(),
    statistic_files=dict(),
    plot_files=dict(),
    )
    outputs = ArtifactDetect.output_spec()

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