Exemplo n.º 1
0
def test_DilateImage_inputs():
    input_map = dict(ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    nan2zeros=dict(position=3,
    argstr='-nan',
    ),
    kernel_file=dict(position=5,
    xor=['kernel_size'],
    argstr='%s',
    ),
    out_file=dict(hash_files=False,
    genfile=True,
    position=-2,
    argstr='%s',
    ),
    args=dict(argstr='%s',
    ),
    internal_datatype=dict(position=1,
    argstr='-dt %s',
    ),
    terminal_output=dict(mandatory=True,
    nohash=True,
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    kernel_shape=dict(position=4,
    argstr='-kernel %s',
    ),
    output_type=dict(),
    operation=dict(position=6,
    mandatory=True,
    argstr='-dil%s',
    ),
    output_datatype=dict(position=-1,
    argstr='-odt %s',
    ),
    kernel_size=dict(position=5,
    xor=['kernel_file'],
    argstr='%.4f',
    ),
    in_file=dict(position=2,
    mandatory=True,
    argstr='%s',
    ),
    )
    inputs = DilateImage.input_spec()

    for key, metadata in input_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_DilateImage_inputs():
    input_map = dict(
        args=dict(argstr='%s', ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        ignore_exception=dict(
            nohash=True,
            usedefault=True,
        ),
        in_file=dict(
            argstr='%s',
            mandatory=True,
            position=2,
        ),
        internal_datatype=dict(
            argstr='-dt %s',
            position=1,
        ),
        kernel_file=dict(
            argstr='%s',
            position=5,
            xor=['kernel_size'],
        ),
        kernel_shape=dict(
            argstr='-kernel %s',
            position=4,
        ),
        kernel_size=dict(
            argstr='%.4f',
            position=5,
            xor=['kernel_file'],
        ),
        nan2zeros=dict(
            argstr='-nan',
            position=3,
        ),
        operation=dict(
            argstr='-dil%s',
            mandatory=True,
            position=6,
        ),
        out_file=dict(
            argstr='%s',
            genfile=True,
            hash_files=False,
            position=-2,
        ),
        output_datatype=dict(
            argstr='-odt %s',
            position=-1,
        ),
        output_type=dict(),
        terminal_output=dict(
            mandatory=True,
            nohash=True,
        ),
    )
    inputs = DilateImage.input_spec()

    for key, metadata in input_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(inputs.traits()[key], metakey), value