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

def test_BEDPOSTX4_inputs():
    input_map = dict(all_ard=dict(argstr='--allard',
    xor=('no_ard', 'all_ard'),
    ),
    args=dict(argstr='%s',
    ),
    bpx_directory=dict(argstr='%s',
    usedefault=True,
    ),
    burn_in=dict(argstr='--burnin=%d',
    ),
    burn_in_no_ard=dict(argstr='--burninnoard=%d',
    ),
    burn_period=dict(argstr='-b %d',
    ),
    bvals=dict(mandatory=True,
    ),
    bvecs=dict(mandatory=True,
    ),
    dwi=dict(mandatory=True,
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    fibres=dict(argstr='-n %d',
    ),
    force_dir=dict(argstr='--forcedir',
    usedefault=True,
    ),
    fudge=dict(argstr='--fudge=%d',
    ),
    gradnonlin=dict(argstr='--gradnonlin=%s',
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    jumps=dict(argstr='-j %d',
    ),
    logdir=dict(argstr='--logdir=%s',
    usedefault=True,
    ),
    mask=dict(mandatory=True,
    ),
    model=dict(argstr='-model %d',
    ),
    n_fibres=dict(argstr='--nfibres=%d',
    ),
    n_jumps=dict(argstr='--njumps=%d',
    ),
    nlgradient=dict(argstr='-g',
    ),
    no_ard=dict(argstr='--noard',
    xor=('no_ard', 'all_ard'),
    ),
    no_cuda=dict(argstr='-c',
    ),
    no_spat=dict(argstr='--nospat',
    xor=('no_spat', 'non_linear'),
    ),
    non_linear=dict(argstr='--nonlinear',
    xor=('no_spat', 'non_linear'),
    ),
    output_type=dict(),
    sample_every=dict(argstr='--sampleevery=%d',
    ),
    sampling=dict(argstr='-s %d',
    ),
    seed=dict(argstr='--seed=%d',
    ),
    terminal_output=dict(mandatory=True,
    nohash=True,
    ),
    update_proposal_every=dict(argstr='--updateproposalevery=%d',
    ),
    weight=dict(argstr='-w %.2f',
    ),
    )
    inputs = BEDPOSTX4.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_BEDPOSTX4_outputs():
    output_map = dict(bpx_out_directory=dict(),
    dyads=dict(),
    mean_fsamples=dict(),
    mean_phsamples=dict(),
    mean_thsamples=dict(),
    merged_fsamples=dict(),
    merged_phsamples=dict(),
    merged_thsamples=dict(),
    xfms_directory=dict(),
    )
    outputs = BEDPOSTX4.output_spec()

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

