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


def test_PatchMatch_inputs():
    input_map = dict(
        args=dict(argstr='%s', ),
        cs_size=dict(argstr='-cs %i', ),
        database_file=dict(
            argstr='-db %s',
            mandatory=True,
            position=3,
        ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        ignore_exception=dict(
            deprecated='1.0.0',
            nohash=True,
            usedefault=True,
        ),
        in_file=dict(
            argstr='-i %s',
            mandatory=True,
            position=1,
        ),
        it_num=dict(argstr='-it %i', ),
        mask_file=dict(
            argstr='-m %s',
            mandatory=True,
            position=2,
        ),
        match_num=dict(argstr='-match %i', ),
        out_file=dict(
            argstr='-o %s',
            name_source=['in_file'],
            name_template='%s_pm.nii.gz',
            position=4,
        ),
        patch_size=dict(argstr='-size %i', ),
        pm_num=dict(argstr='-pm %i', ),
        terminal_output=dict(
            deprecated='1.0.0',
            nohash=True,
        ),
    )
    inputs = PatchMatch.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_PatchMatch_outputs():
    output_map = dict(out_file=dict(), )
    outputs = PatchMatch.output_spec()

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