# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ....testing import assert_equal
from ..preprocess import ApplyVolTransform


def test_ApplyVolTransform_inputs():
    input_map = dict(args=dict(argstr='%s',
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    fs_target=dict(argstr='--fstarg',
    mandatory=True,
    requires=['reg_file'],
    xor=('target_file', 'tal', 'fs_target'),
    ),
    fsl_reg_file=dict(argstr='--fsl %s',
    mandatory=True,
    xor=('reg_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'subject'),
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    interp=dict(argstr='--interp %s',
    ),
    inverse=dict(argstr='--inv',
    ),
    invert_morph=dict(argstr='--inv-morph',
    requires=['m3z_file'],
    ),
    m3z_file=dict(argstr='--m3z %s',
    ),
    no_ded_m3z_path=dict(argstr='--noDefM3zPath',
    requires=['m3z_file'],
    ),
    no_resample=dict(argstr='--no-resample',
    ),
    reg_file=dict(argstr='--reg %s',
    mandatory=True,
    xor=('reg_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'subject'),
    ),
    reg_header=dict(argstr='--regheader',
    mandatory=True,
    xor=('reg_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'subject'),
    ),
    source_file=dict(argstr='--mov %s',
    copyfile=False,
    mandatory=True,
    ),
    subject=dict(argstr='--s %s',
    mandatory=True,
    xor=('reg_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'subject'),
    ),
    subjects_dir=dict(),
    tal=dict(argstr='--tal',
    mandatory=True,
    xor=('target_file', 'tal', 'fs_target'),
    ),
    tal_resolution=dict(argstr='--talres %.10f',
    ),
    target_file=dict(argstr='--targ %s',
    mandatory=True,
    xor=('target_file', 'tal', 'fs_target'),
    ),
    terminal_output=dict(nohash=True,
    ),
    transformed_file=dict(argstr='--o %s',
    genfile=True,
    ),
    xfm_reg_file=dict(argstr='--xfm %s',
    mandatory=True,
    xor=('reg_file', 'fsl_reg_file', 'xfm_reg_file', 'reg_header', 'subject'),
    ),
    )
    inputs = ApplyVolTransform.input_spec()

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


def test_ApplyVolTransform_outputs():
    output_map = dict(transformed_file=dict(),
    )
    outputs = ApplyVolTransform.output_spec()

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