# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..asl import FitAsl


def test_FitAsl_inputs():
    input_map = dict(args=dict(argstr='%s',
    ),
    cbf_file=dict(argstr='-cbf %s',
    name_source=['source_file'],
    name_template='%s_cbf.nii.gz',
    ),
    dpld=dict(argstr='-dPLD %f',
    ),
    dt_inv2=dict(argstr='-dTinv2 %f',
    ),
    eff=dict(argstr='-eff %f',
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    error_file=dict(argstr='-error %s',
    name_source=['source_file'],
    name_template='%s_error.nii.gz',
    ),
    gm_plasma=dict(argstr='-gmL %f',
    ),
    gm_t1=dict(argstr='-gmT1 %f',
    ),
    gm_ttt=dict(argstr='-gmTTT %f',
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    ir_output=dict(argstr='-IRoutput %s',
    ),
    ir_volume=dict(argstr='-IRvolume %s',
    ),
    ldd=dict(argstr='-LDD %f',
    ),
    m0map=dict(argstr='-m0map %s',
    ),
    m0mape=dict(argstr='-m0mape %s',
    ),
    mask=dict(argstr='-mask %s',
    position=2,
    ),
    mul=dict(argstr='-mul %f',
    ),
    mulgm=dict(argstr='-sig',
    ),
    out=dict(argstr='-out %f',
    ),
    pasl=dict(argstr='-pasl',
    ),
    pcasl=dict(argstr='-pcasl',
    ),
    plasma_coeff=dict(argstr='-L %f',
    ),
    pld=dict(argstr='-PLD %f',
    ),
    pv0=dict(argstr='-pv0 %d',
    ),
    pv2=dict(argstr='-pv2 %d',
    ),
    pv3=dict(argstr='-pv3 %d %d %d',
    ),
    pv_threshold=dict(argstr='-pvthreshold',
    ),
    seg=dict(argstr='-seg %s',
    ),
    segstyle=dict(argstr='-segstyle',
    ),
    sig=dict(argstr='-sig',
    ),
    source_file=dict(argstr='-source %s',
    mandatory=True,
    position=1,
    ),
    syn_file=dict(argstr='-syn %s',
    name_source=['source_file'],
    name_template='%s_syn.nii.gz',
    ),
    t1_art_cmp=dict(argstr='-T1a %f',
    ),
    t1map=dict(argstr='-t1map %s',
    ),
    t_inv1=dict(argstr='-Tinv1 %f',
    ),
    t_inv2=dict(argstr='-Tinv2 %f',
    ),
    terminal_output=dict(deprecated='1.0.0',
    nohash=True,
    ),
    wm_plasma=dict(argstr='-wmL %f',
    ),
    wm_t1=dict(argstr='-wmT1 %f',
    ),
    wm_ttt=dict(argstr='-wmTTT %f',
    ),
    )
    inputs = FitAsl.input_spec()

    for key, metadata in list(input_map.items()):
        for metakey, value in list(metadata.items()):
            assert getattr(inputs.traits()[key], metakey) == value


def test_FitAsl_outputs():
    output_map = dict(cbf_file=dict(),
    error_file=dict(),
    syn_file=dict(),
    )
    outputs = FitAsl.output_spec()

    for key, metadata in list(output_map.items()):
        for metakey, value in list(metadata.items()):
            assert getattr(outputs.traits()[key], metakey) == value
