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


def test_Undump_inputs():
    input_map = dict(args=dict(argstr='%s',
    ),
    coordinates_specification=dict(argstr='-%s',
    ),
    datatype=dict(argstr='-datum %s',
    ),
    default_value=dict(argstr='-dval %f',
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    fill_value=dict(argstr='-fval %f',
    ),
    head_only=dict(argstr='-head_only',
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    in_file=dict(argstr='-master %s',
    copyfile=False,
    mandatory=True,
    position=-1,
    ),
    mask_file=dict(argstr='-mask %s',
    ),
    num_threads=dict(nohash=True,
    usedefault=True,
    ),
    orient=dict(argstr='-orient %s',
    ),
    out_file=dict(argstr='-prefix %s',
    name_source='in_file',
    ),
    outputtype=dict(),
    srad=dict(argstr='-srad %f',
    ),
    terminal_output=dict(deprecated='1.0.0',
    nohash=True,
    ),
    )
    inputs = Undump.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_Undump_outputs():
    output_map = dict(out_file=dict(),
    )
    outputs = Undump.output_spec()

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