# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..epi import EPIDeWarp


def test_EPIDeWarp_inputs():
    input_map = dict(
        args=dict(argstr="%s",),
        cleanup=dict(argstr="--cleanup",),
        dph_file=dict(argstr="--dph %s", extensions=None, mandatory=True,),
        environ=dict(nohash=True, usedefault=True,),
        epi_file=dict(argstr="--epi %s", extensions=None,),
        epidw=dict(argstr="--epidw %s", genfile=False,),
        esp=dict(argstr="--esp %s", usedefault=True,),
        exf_file=dict(argstr="--exf %s", extensions=None,),
        exfdw=dict(argstr="--exfdw %s", genfile=True,),
        mag_file=dict(argstr="--mag %s", extensions=None, mandatory=True, position=0,),
        nocleanup=dict(argstr="--nocleanup", usedefault=True,),
        output_type=dict(),
        sigma=dict(argstr="--sigma %s", usedefault=True,),
        tediff=dict(argstr="--tediff %s", usedefault=True,),
        tmpdir=dict(argstr="--tmpdir %s", genfile=True,),
        vsm=dict(argstr="--vsm %s", genfile=True,),
    )
    inputs = EPIDeWarp.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_EPIDeWarp_outputs():
    output_map = dict(
        exf_mask=dict(extensions=None,),
        exfdw=dict(extensions=None,),
        unwarped_file=dict(extensions=None,),
        vsm_file=dict(extensions=None,),
    )
    outputs = EPIDeWarp.output_spec()

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