# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.fsl.preprocess import BET
def test_BET_inputs():
    input_map = dict(remove_eyes=dict(xor=('functional', 'reduce_bias', 'robust', 'padding', 'remove_eyes', 'surfaces', 't2_guided'),
    argstr='-S',
    ),
    no_output=dict(argstr='-n',
    ),
    out_file=dict(hash_files=False,
    genfile=True,
    position=1,
    argstr='%s',
    ),
    functional=dict(xor=('functional', 'reduce_bias', 'robust', 'padding', 'remove_eyes', 'surfaces', 't2_guided'),
    argstr='-F',
    ),
    radius=dict(units='mm',
    argstr='-r %d',
    ),
    threshold=dict(argstr='-t',
    ),
    surfaces=dict(xor=('functional', 'reduce_bias', 'robust', 'padding', 'remove_eyes', 'surfaces', 't2_guided'),
    argstr='-A',
    ),
    t2_guided=dict(xor=('functional', 'reduce_bias', 'robust', 'padding', 'remove_eyes', 'surfaces', 't2_guided'),
    argstr='-A2 %s',
    ),
    in_file=dict(position=0,
    mandatory=True,
    argstr='%s',
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    vertical_gradient=dict(argstr='-g %.2f',
    ),
    frac=dict(argstr='-f %.2f',
    ),
    reduce_bias=dict(xor=('functional', 'reduce_bias', 'robust', 'padding', 'remove_eyes', 'surfaces', 't2_guided'),
    argstr='-B',
    ),
    args=dict(argstr='%s',
    ),
    padding=dict(xor=('functional', 'reduce_bias', 'robust', 'padding', 'remove_eyes', 'surfaces', 't2_guided'),
    argstr='-Z',
    ),
    mesh=dict(argstr='-e',
    ),
    robust=dict(xor=('functional', 'reduce_bias', 'robust', 'padding', 'remove_eyes', 'surfaces', 't2_guided'),
    argstr='-R',
    ),
    center=dict(units='voxels',
    argstr='-c %s',
    ),
    outline=dict(argstr='-o',
    ),
    skull=dict(argstr='-s',
    ),
    mask=dict(argstr='-m',
    ),
    terminal_output=dict(mandatory=True,
    nohash=True,
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    output_type=dict(),
    )
    inputs = BET.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_BET_outputs():
    output_map = dict(outline_file=dict(),
    inskull_mask_file=dict(),
    out_file=dict(),
    meshfile=dict(),
    inskull_mesh_file=dict(),
    outskin_mask_file=dict(),
    outskull_mesh_file=dict(),
    skull_mask_file=dict(),
    mask_file=dict(),
    outskin_mesh_file=dict(),
    outskull_mask_file=dict(),
    )
    outputs = BET.output_spec()

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