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


def test_DenoiseImage_inputs():
    input_map = dict(args=dict(argstr='%s',
    ),
    dimension=dict(argstr='-d %d',
    usedefault=False,
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    input_image=dict(argstr='-i %s',
    mandatory=True,
    ),
    noise_image=dict(hash_files=False,
    keep_extension=True,
    name_source=['input_image'],
    name_template='%s_noise',
    ),
    noise_model=dict(argstr='-n %s',
    usedefault=True,
    ),
    num_threads=dict(nohash=True,
    usedefault=True,
    ),
    output_image=dict(argstr='-o %s',
    hash_files=False,
    keep_extension=True,
    name_source=['input_image'],
    name_template='%s_noise_corrected',
    ),
    save_noise=dict(mandatory=True,
    usedefault=True,
    xor=['noise_image'],
    ),
    shrink_factor=dict(argstr='-s %s',
    usedefault=True,
    ),
    terminal_output=dict(nohash=True,
    ),
    verbose=dict(argstr='-v',
    ),
    )
    inputs = DenoiseImage.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_DenoiseImage_outputs():
    output_map = dict(noise_image=dict(),
    output_image=dict(),
    )
    outputs = DenoiseImage.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
