# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.freesurfer.preprocess import RobustRegister
def test_RobustRegister_inputs():
    input_map = dict(no_init=dict(argstr='--noinit',
    ),
    init_orient=dict(argstr='--initorient',
    ),
    auto_sens=dict(xor=['outlier_sens'],
    mandatory=True,
    argstr='--satit',
    ),
    source_file=dict(mandatory=True,
    argstr='--mov %s',
    ),
    outlier_limit=dict(argstr='--wlimit %.3f',
    ),
    force_float=dict(argstr='--floattype',
    ),
    half_targ=dict(argstr='--halfdst %s',
    ),
    max_iterations=dict(argstr='--maxit %d',
    ),
    write_vo2vox=dict(argstr='--vox2vox',
    ),
    high_iterations=dict(argstr='--highit %d',
    ),
    half_source=dict(argstr='--halfmov %s',
    ),
    force_double=dict(argstr='--doubleprec',
    ),
    out_reg_file=dict(argstr='--lta %s',
    genfile=True,
    ),
    half_source_xfm=dict(argstr='--halfmovlta %s',
    ),
    subsample_thresh=dict(argstr='--subsample %d',
    ),
    no_multi=dict(argstr='--nomulti',
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    trans_only=dict(argstr='--transonly',
    ),
    in_xfm_file=dict(argstr='--transform',
    ),
    registered_file=dict(argstr='--warp %s',
    ),
    least_squares=dict(argstr='--leastsquares',
    ),
    args=dict(argstr='%s',
    ),
    mask_source=dict(argstr='--maskmov %s',
    ),
    outlier_sens=dict(xor=['auto_sens'],
    mandatory=True,
    argstr='--sat %.4f',
    ),
    subjects_dir=dict(),
    mask_target=dict(argstr='--maskdst %s',
    ),
    half_weights=dict(argstr='--halfweights %s',
    ),
    target_file=dict(mandatory=True,
    argstr='--dst %s',
    ),
    est_int_scale=dict(argstr='--iscale',
    ),
    weights_file=dict(argstr='--weights %s',
    ),
    half_targ_xfm=dict(argstr='--halfdstlta %s',
    ),
    iteration_thresh=dict(argstr='--epsit %.3f',
    ),
    terminal_output=dict(mandatory=True,
    nohash=True,
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    )
    inputs = RobustRegister.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_RobustRegister_outputs():
    output_map = dict(out_reg_file=dict(),
    half_weights=dict(),
    registered_file=dict(),
    half_source=dict(),
    half_targ=dict(),
    weights_file=dict(),
    half_targ_xfm=dict(),
    half_source_xfm=dict(),
    )
    outputs = RobustRegister.output_spec()

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