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


def test_BBox_inputs():
    input_map = dict(args=dict(argstr='%s',
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    format_minccrop=dict(argstr='-minccrop',
    ),
    format_mincresample=dict(argstr='-mincresample',
    ),
    format_mincreshape=dict(argstr='-mincreshape',
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    input_file=dict(argstr='%s',
    mandatory=True,
    position=-2,
    ),
    one_line=dict(argstr='-one_line',
    xor=('one_line', 'two_lines'),
    ),
    out_file=dict(argstr='> %s',
    genfile=True,
    position=-1,
    ),
    output_file=dict(hash_files=False,
    keep_extension=False,
    name_source=['input_file'],
    name_template='%s_bbox.txt',
    position=-1,
    ),
    terminal_output=dict(nohash=True,
    ),
    threshold=dict(argstr='-threshold',
    ),
    two_lines=dict(argstr='-two_lines',
    xor=('one_line', 'two_lines'),
    ),
    )
    inputs = BBox.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_BBox_outputs():
    output_map = dict(output_file=dict(),
    )
    outputs = BBox.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
