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


def test_TCompCor_inputs():
    input_map = dict(
        components_file=dict(usedefault=True, ),
        header_prefix=dict(),
        high_pass_cutoff=dict(usedefault=True, ),
        ignore_exception=dict(
            deprecated='1.0.0',
            nohash=True,
            usedefault=True,
        ),
        ignore_initial_volumes=dict(usedefault=True, ),
        mask_files=dict(),
        mask_index=dict(
            requires=['mask_files'],
            xor=['merge_method'],
        ),
        merge_method=dict(
            requires=['mask_files'],
            xor=['mask_index'],
        ),
        num_components=dict(usedefault=True, ),
        percentile_threshold=dict(usedefault=True, ),
        pre_filter=dict(usedefault=True, ),
        realigned_file=dict(mandatory=True, ),
        regress_poly_degree=dict(usedefault=True, ),
        repetition_time=dict(),
        save_pre_filter=dict(),
        use_regress_poly=dict(
            deprecated='0.15.0',
            new_name='pre_filter',
        ),
    )
    inputs = TCompCor.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_TCompCor_outputs():
    output_map = dict(
        components_file=dict(),
        high_variance_masks=dict(),
        pre_filter_file=dict(),
    )
    outputs = TCompCor.output_spec()

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