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


def test_Bse_inputs():
    input_map = dict(
        args=dict(argstr='%s', ),
        diffusionConstant=dict(
            argstr='-d %f',
            usedefault=True,
        ),
        diffusionIterations=dict(
            argstr='-n %d',
            usedefault=True,
        ),
        dilateFinalMask=dict(
            argstr='-p',
            usedefault=True,
        ),
        edgeDetectionConstant=dict(
            argstr='-s %f',
            usedefault=True,
        ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        inputMRIFile=dict(
            argstr='-i %s',
            extensions=None,
            mandatory=True,
        ),
        noRotate=dict(argstr='--norotate', ),
        outputCortexFile=dict(
            argstr='--cortex %s',
            extensions=None,
            hash_files=False,
        ),
        outputDetailedBrainMask=dict(
            argstr='--hires %s',
            extensions=None,
            hash_files=False,
        ),
        outputDiffusionFilter=dict(
            argstr='--adf %s',
            extensions=None,
            hash_files=False,
        ),
        outputEdgeMap=dict(
            argstr='--edge %s',
            extensions=None,
            hash_files=False,
        ),
        outputMRIVolume=dict(
            argstr='-o %s',
            extensions=None,
            genfile=True,
            hash_files=False,
        ),
        outputMaskFile=dict(
            argstr='--mask %s',
            extensions=None,
            genfile=True,
            hash_files=False,
        ),
        radius=dict(
            argstr='-r %f',
            usedefault=True,
        ),
        timer=dict(argstr='--timer', ),
        trim=dict(
            argstr='--trim',
            usedefault=True,
        ),
        verbosityLevel=dict(
            argstr='-v %f',
            usedefault=True,
        ),
    )
    inputs = Bse.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_Bse_outputs():
    output_map = dict(
        outputCortexFile=dict(extensions=None, ),
        outputDetailedBrainMask=dict(extensions=None, ),
        outputDiffusionFilter=dict(extensions=None, ),
        outputEdgeMap=dict(extensions=None, ),
        outputMRIVolume=dict(extensions=None, ),
        outputMaskFile=dict(extensions=None, ),
    )
    outputs = Bse.output_spec()

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