# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.fsl.preprocess import PRELUDE

def test_PRELUDE_inputs():
    input_map = dict(args=dict(argstr='%s',
    ),
    complex_phase_file=dict(argstr='--complex=%s',
    mandatory=True,
    xor=['magnitude_file', 'phase_file'],
    ),
    end=dict(argstr='--end=%d',
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    label_file=dict(argstr='--labels=%s',
    hash_files=False,
    ),
    labelprocess2d=dict(argstr='--labelslices',
    ),
    magnitude_file=dict(argstr='--abs=%s',
    mandatory=True,
    xor=['complex_phase_file'],
    ),
    mask_file=dict(argstr='--mask=%s',
    ),
    num_partitions=dict(argstr='--numphasesplit=%d',
    ),
    output_type=dict(),
    phase_file=dict(argstr='--phase=%s',
    mandatory=True,
    xor=['complex_phase_file'],
    ),
    process2d=dict(argstr='--slices',
    xor=['labelprocess2d'],
    ),
    process3d=dict(argstr='--force3D',
    xor=['labelprocess2d', 'process2d'],
    ),
    rawphase_file=dict(argstr='--rawphase=%s',
    hash_files=False,
    ),
    removeramps=dict(argstr='--removeramps',
    ),
    savemask_file=dict(argstr='--savemask=%s',
    hash_files=False,
    ),
    start=dict(argstr='--start=%d',
    ),
    terminal_output=dict(mandatory=True,
    nohash=True,
    ),
    threshold=dict(argstr='--thresh=%.10f',
    ),
    unwrapped_phase_file=dict(argstr='--unwrap=%s',
    genfile=True,
    hash_files=False,
    ),
    )
    inputs = PRELUDE.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_PRELUDE_outputs():
    output_map = dict(unwrapped_phase_file=dict(),
    )
    outputs = PRELUDE.output_spec()

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

