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


def test_CorticalThickness_inputs():
    input_map = dict(
        anatomical_image=dict(argstr="-a %s", extensions=None, mandatory=True,),
        args=dict(argstr="%s",),
        b_spline_smoothing=dict(argstr="-v",),
        brain_probability_mask=dict(
            argstr="-m %s", copyfile=False, extensions=None, mandatory=True,
        ),
        brain_template=dict(argstr="-e %s", extensions=None, mandatory=True,),
        cortical_label_image=dict(extensions=None,),
        debug=dict(argstr="-z 1",),
        dimension=dict(argstr="-d %d", usedefault=True,),
        environ=dict(nohash=True, usedefault=True,),
        extraction_registration_mask=dict(argstr="-f %s", extensions=None,),
        image_suffix=dict(argstr="-s %s", usedefault=True,),
        keep_temporary_files=dict(argstr="-k %d",),
        label_propagation=dict(argstr="-l %s",),
        max_iterations=dict(argstr="-i %d",),
        num_threads=dict(nohash=True, usedefault=True,),
        out_prefix=dict(argstr="-o %s", usedefault=True,),
        posterior_formulation=dict(argstr="-b %s",),
        prior_segmentation_weight=dict(argstr="-w %f",),
        quick_registration=dict(argstr="-q 1",),
        segmentation_iterations=dict(argstr="-n %d",),
        segmentation_priors=dict(argstr="-p %s", mandatory=True,),
        t1_registration_template=dict(argstr="-t %s", extensions=None, mandatory=True,),
        use_floatingpoint_precision=dict(argstr="-j %d",),
        use_random_seeding=dict(argstr="-u %d",),
    )
    inputs = CorticalThickness.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_CorticalThickness_outputs():
    output_map = dict(
        BrainExtractionMask=dict(extensions=None,),
        BrainSegmentation=dict(extensions=None,),
        BrainSegmentationN4=dict(extensions=None,),
        BrainSegmentationPosteriors=dict(),
        BrainVolumes=dict(extensions=None,),
        CorticalThickness=dict(extensions=None,),
        CorticalThicknessNormedToTemplate=dict(extensions=None,),
        ExtractedBrainN4=dict(extensions=None,),
        SubjectToTemplate0GenericAffine=dict(extensions=None,),
        SubjectToTemplate1Warp=dict(extensions=None,),
        SubjectToTemplateLogJacobian=dict(extensions=None,),
        TemplateToSubject0Warp=dict(extensions=None,),
        TemplateToSubject1GenericAffine=dict(extensions=None,),
    )
    outputs = CorticalThickness.output_spec()

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