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


def test_Bandpass_inputs():
    input_map = dict(
        args=dict(
            argstr="%s",
        ),
        automask=dict(
            argstr="-automask",
        ),
        blur=dict(
            argstr="-blur %f",
        ),
        despike=dict(
            argstr="-despike",
        ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        highpass=dict(
            argstr="%f",
            mandatory=True,
            position=-3,
        ),
        in_file=dict(
            argstr="%s",
            copyfile=False,
            extensions=None,
            mandatory=True,
            position=-1,
        ),
        localPV=dict(
            argstr="-localPV %f",
        ),
        lowpass=dict(
            argstr="%f",
            mandatory=True,
            position=-2,
        ),
        mask=dict(
            argstr="-mask %s",
            extensions=None,
            position=2,
        ),
        nfft=dict(
            argstr="-nfft %d",
        ),
        no_detrend=dict(
            argstr="-nodetrend",
        ),
        normalize=dict(
            argstr="-norm",
        ),
        notrans=dict(
            argstr="-notrans",
        ),
        num_threads=dict(
            nohash=True,
            usedefault=True,
        ),
        orthogonalize_dset=dict(
            argstr="-dsort %s",
            extensions=None,
        ),
        orthogonalize_file=dict(
            argstr="-ort %s",
        ),
        out_file=dict(
            argstr="-prefix %s",
            extensions=None,
            name_source="in_file",
            name_template="%s_bp",
            position=1,
        ),
        outputtype=dict(),
        tr=dict(
            argstr="-dt %f",
        ),
    )
    inputs = Bandpass.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_Bandpass_outputs():
    output_map = dict(
        out_file=dict(
            extensions=None,
        ),
    )
    outputs = Bandpass.output_spec()

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