|
| 1 | +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT |
| 2 | +from __future__ import unicode_literals |
| 3 | +from ..utils import CatMatvec |
| 4 | + |
| 5 | + |
| 6 | +def test_CatMatvec_inputs(): |
| 7 | + input_map = dict(args=dict(argstr='%s', |
| 8 | + ), |
| 9 | + environ=dict(nohash=True, |
| 10 | + usedefault=True, |
| 11 | + ), |
| 12 | + fourxfour=dict(argstr='-4x4', |
| 13 | + descr='Output matrix in augmented form (last row is 0 0 0 1)This option does not work with -MATRIX or -ONELINE', |
| 14 | + xor=['matrix', 'oneline'], |
| 15 | + ), |
| 16 | + ignore_exception=dict(nohash=True, |
| 17 | + usedefault=True, |
| 18 | + ), |
| 19 | + in_file=dict(argstr='%s', |
| 20 | + descr='list of tuples of mfiles and associated opkeys', |
| 21 | + mandatory=True, |
| 22 | + position=-2, |
| 23 | + ), |
| 24 | + matrix=dict(argstr='-MATRIX', |
| 25 | + descr="indicates that the resulting matrix willbe written to outfile in the 'MATRIX(...)' format (FORM 3).This feature could be used, with clever scripting, to inputa matrix directly on the command line to program 3dWarp.", |
| 26 | + xor=['oneline', 'fourXfour'], |
| 27 | + ), |
| 28 | + oneline=dict(argstr='-ONELINE', |
| 29 | + descr='indicates that the resulting matrixwill simply be written as 12 numbers on one line.', |
| 30 | + xor=['matrix', 'fourXfour'], |
| 31 | + ), |
| 32 | + out_file=dict(argstr=' > %s', |
| 33 | + descr='File to write concattenated matvecs to', |
| 34 | + mandatory=True, |
| 35 | + position=-1, |
| 36 | + ), |
| 37 | + outputtype=dict(), |
| 38 | + terminal_output=dict(nohash=True, |
| 39 | + ), |
| 40 | + ) |
| 41 | + inputs = CatMatvec.input_spec() |
| 42 | + |
| 43 | + for key, metadata in list(input_map.items()): |
| 44 | + for metakey, value in list(metadata.items()): |
| 45 | + assert getattr(inputs.traits()[key], metakey) == value |
| 46 | + |
| 47 | + |
| 48 | +def test_CatMatvec_outputs(): |
| 49 | + output_map = dict(out_file=dict(), |
| 50 | + ) |
| 51 | + outputs = CatMatvec.output_spec() |
| 52 | + |
| 53 | + for key, metadata in list(output_map.items()): |
| 54 | + for metakey, value in list(metadata.items()): |
| 55 | + assert getattr(outputs.traits()[key], metakey) == value |
0 commit comments