def test_FIRST_inputs(): input_map = dict(affine_file=dict(argstr='-a %s', position=6, ), args=dict(argstr='%s', ), brain_extracted=dict(argstr='-b', position=2, ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=True, usedefault=True, ), in_file=dict(argstr='-i %s', copyfile=False, mandatory=True, position=-2, ), list_of_specific_structures=dict(argstr='-s %s', position=5, sep=',', ), method=dict(argstr='-m', position=4, xor=['method_as_numerical_threshold'], ), method_as_numerical_threshold=dict(argstr='-m', position=4, ), no_cleanup=dict(argstr='-d', position=3, ), out_file=dict(argstr='-o %s', hash_files=False, mandatory=True, position=-1, usedefault=True, ), output_type=dict(), terminal_output=dict(mandatory=True, nohash=True, ), verbose=dict(argstr='-v', position=1, ), ) inputs = FIRST.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_FIRST_inputs(): input_map = dict( ignore_exception=dict(nohash=True, usedefault=True), affine_file=dict(position=6, argstr="-a %s"), list_of_specific_structures=dict(argstr="-s %s", sep=",", position=5), verbose=dict(position=1, argstr="-v"), args=dict(argstr="%s"), brain_extracted=dict(position=2, argstr="-b"), in_file=dict(position=-2, mandatory=True, argstr="-i %s"), terminal_output=dict(mandatory=True, nohash=True), environ=dict(nohash=True, usedefault=True), no_cleanup=dict(position=3, argstr="-d"), method_as_numerical_threshold=dict(position=4, argstr="-m"), output_type=dict(), method=dict(position=4, xor=["method_as_numerical_threshold"], argstr="-m"), out_file=dict(hash_files=False, mandatory=True, usedefault=True, position=-1, argstr="-o %s"), ) inputs = FIRST.input_spec() for key, metadata in input_map.items(): for metakey, value in metadata.items(): yield assert_equal, getattr(inputs.traits()[key], metakey), value