# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.fsl.preprocess import FUGUE
def test_FUGUE_inputs():
    input_map = dict(ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    dwell_time=dict(argstr='--dwell=%.10f',
    ),
    asym_se_time=dict(argstr='--asym=%.10f',
    ),
    smooth3d=dict(argstr='--smooth3=%.2f',
    ),
    no_gap_fill=dict(argstr='--nofill',
    ),
    forward_warping=dict(usedefault=True,
    ),
    phasemap_file=dict(argstr='--phasemap=%s',
    ),
    save_shift=dict(),
    poly_order=dict(argstr='--poly=%d',
    ),
    shift_in_file=dict(argstr='--loadshift=%s',
    ),
    shift_out_file=dict(hash_files=False,
    argstr='--saveshift=%s',
    ),
    median_2dfilter=dict(argstr='--median',
    ),
    save_unmasked_shift=dict(requires=['shift_out_file'],
    argstr='--unmaskshift',
    ),
    despike_2dfilter=dict(argstr='--despike',
    ),
    save_unmasked_fmap=dict(requires=['fmap_out_file'],
    argstr='--unmaskfmap',
    ),
    in_file=dict(argstr='--in=%s',
    ),
    warped_file=dict(hash_files=False,
    argstr='--warp=%s',
    ),
    dwell_to_asym_ratio=dict(argstr='--dwelltoasym=%.10f',
    ),
    unwarped_file=dict(argstr='--unwarp=%s',
    hash_files=False,
    genfile=True,
    ),
    icorr_only=dict(requires=['unwarped_file'],
    argstr='--icorronly',
    ),
    smooth2d=dict(argstr='--smooth2=%.2f',
    ),
    phase_conjugate=dict(argstr='--phaseconj',
    ),
    pava=dict(argstr='--pava',
    ),
    args=dict(argstr='%s',
    ),
    terminal_output=dict(mandatory=True,
    nohash=True,
    ),
    output_type=dict(),
    icorr=dict(requires=['shift_in_file'],
    argstr='--icorr',
    ),
    fmap_in_file=dict(argstr='--loadfmap=%s',
    ),
    despike_threshold=dict(argstr='--despikethreshold=%s',
    ),
    unwarp_direction=dict(argstr='--unwarpdir=%s',
    ),
    fmap_out_file=dict(hash_files=False,
    argstr='--savefmap=%s',
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    mask_file=dict(argstr='--mask=%s',
    ),
    no_extend=dict(argstr='--noextend',
    ),
    fourier_order=dict(argstr='--fourier=%d',
    ),
    nokspace=dict(argstr='--nokspace',
    ),
    )
    inputs = FUGUE.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_FUGUE_outputs():
    output_map = dict(unwarped_file=dict(),
    shift_out_file=dict(),
    fmap_out_file=dict(),
    warped_file=dict(),
    )
    outputs = FUGUE.output_spec()

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