|
| 1 | +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT |
| 2 | +from nipype.testing import assert_equal |
| 3 | +from nipype.interfaces.fsl.utils import MotionOutliers |
| 4 | + |
| 5 | +def test_MotionOutliers_inputs(): |
| 6 | + input_map = dict(args=dict(argstr='%s', |
| 7 | + ), |
| 8 | + dummy=dict(argstr='--dummy=%d', |
| 9 | + ), |
| 10 | + environ=dict(nohash=True, |
| 11 | + usedefault=True, |
| 12 | + ), |
| 13 | + ignore_exception=dict(nohash=True, |
| 14 | + usedefault=True, |
| 15 | + ), |
| 16 | + in_file=dict(argstr='-i %s', |
| 17 | + mandatory=True, |
| 18 | + ), |
| 19 | + mask=dict(argstr='-m %s', |
| 20 | + ), |
| 21 | + metric=dict(argstr='--%s', |
| 22 | + ), |
| 23 | + no_motion_correction=dict(argstr='--nomoco', |
| 24 | + ), |
| 25 | + out_file=dict(argstr='-o %s', |
| 26 | + hash_files=False, |
| 27 | + keep_extension=True, |
| 28 | + name_source='in_file', |
| 29 | + name_template='%s_outliers.txt', |
| 30 | + ), |
| 31 | + out_metric_plot=dict(argstr='-p %s', |
| 32 | + hash_files=False, |
| 33 | + keep_extension=True, |
| 34 | + name_source='in_file', |
| 35 | + name_template='%s_metrics.png', |
| 36 | + ), |
| 37 | + out_metric_values=dict(argstr='-s %s', |
| 38 | + hash_files=False, |
| 39 | + keep_extension=True, |
| 40 | + name_source='in_file', |
| 41 | + name_template='%s_metrics.txt', |
| 42 | + ), |
| 43 | + output_type=dict(), |
| 44 | + terminal_output=dict(nohash=True, |
| 45 | + ), |
| 46 | + threshold=dict(argstr='--thresh=%g', |
| 47 | + ), |
| 48 | + ) |
| 49 | + inputs = MotionOutliers.input_spec() |
| 50 | + |
| 51 | + for key, metadata in input_map.items(): |
| 52 | + for metakey, value in metadata.items(): |
| 53 | + yield assert_equal, getattr(inputs.traits()[key], metakey), value |
| 54 | + |
| 55 | +def test_MotionOutliers_outputs(): |
| 56 | + output_map = dict(out_file=dict(), |
| 57 | + out_metric_plot=dict(), |
| 58 | + out_metric_values=dict(), |
| 59 | + ) |
| 60 | + outputs = MotionOutliers.output_spec() |
| 61 | + |
| 62 | + for key, metadata in output_map.items(): |
| 63 | + for metakey, value in metadata.items(): |
| 64 | + yield assert_equal, getattr(outputs.traits()[key], metakey), value |
| 65 | + |
0 commit comments