Exemplo n.º 1
0
def test_GenerateDirections_inputs():
    input_map = dict(
        args=dict(argstr='%s', ),
        display_debug=dict(argstr='-debug', ),
        display_info=dict(argstr='-info', ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        ignore_exception=dict(
            nohash=True,
            usedefault=True,
        ),
        niter=dict(argstr='-niter %s', ),
        num_dirs=dict(
            argstr='%s',
            mandatory=True,
            position=-2,
        ),
        out_file=dict(
            argstr='%s',
            hash_files=False,
            name_source=['num_dirs'],
            name_template='directions_%d.txt',
            position=-1,
        ),
        power=dict(argstr='-power %s', ),
        quiet_display=dict(argstr='-quiet', ),
        terminal_output=dict(nohash=True, ),
    )
    inputs = GenerateDirections.input_spec()

    for key, metadata in input_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(inputs.traits()[key], metakey), value
Exemplo n.º 2
0
def test_GenerateDirections_outputs():
    output_map = dict(out_file=dict(), )
    outputs = GenerateDirections.output_spec()

    for key, metadata in output_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(outputs.traits()[key], metakey), value
def test_GenerateDirections_outputs():
    output_map = dict(out_file=dict(),
    )
    outputs = GenerateDirections.output_spec()

    for key, metadata in output_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(outputs.traits()[key], metakey), value
def test_GenerateDirections_inputs():
    input_map = dict(args=dict(argstr='%s',
    ),
    display_debug=dict(argstr='-debug',
    ),
    display_info=dict(argstr='-info',
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    niter=dict(argstr='-niter %s',
    ),
    num_dirs=dict(argstr='%s',
    mandatory=True,
    position=-2,
    ),
    out_file=dict(argstr='%s',
    hash_files=False,
    name_source=['num_dirs'],
    name_template='directions_%d.txt',
    position=-1,
    ),
    power=dict(argstr='-power %s',
    ),
    quiet_display=dict(argstr='-quiet',
    ),
    terminal_output=dict(mandatory=True,
    nohash=True,
    ),
    )
    inputs = GenerateDirections.input_spec()

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