|
| 1 | +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT |
| 2 | +from nipype.testing import assert_equal |
| 3 | +from nipype.algorithms.misc import Overlap |
| 4 | + |
| 5 | +def test_Overlap_inputs(): |
| 6 | + input_map = dict(bg_overlap=dict(mandatory=True, |
| 7 | + usedefault=True, |
| 8 | + ), |
| 9 | + ignore_exception=dict(nohash=True, |
| 10 | + usedefault=True, |
| 11 | + ), |
| 12 | + mask_volume=dict(), |
| 13 | + out_file=dict(usedefault=True, |
| 14 | + ), |
| 15 | + vol_units=dict(mandatory=True, |
| 16 | + usedefault=True, |
| 17 | + ), |
| 18 | + volume1=dict(mandatory=True, |
| 19 | + ), |
| 20 | + volume2=dict(mandatory=True, |
| 21 | + ), |
| 22 | + weighting=dict(usedefault=True, |
| 23 | + ), |
| 24 | + ) |
| 25 | + inputs = Overlap.input_spec() |
| 26 | + |
| 27 | + for key, metadata in input_map.items(): |
| 28 | + for metakey, value in metadata.items(): |
| 29 | + yield assert_equal, getattr(inputs.traits()[key], metakey), value |
| 30 | + |
| 31 | +def test_Overlap_outputs(): |
| 32 | + output_map = dict(dice=dict(), |
| 33 | + diff_file=dict(), |
| 34 | + jaccard=dict(), |
| 35 | + labels=dict(), |
| 36 | + roi_di=dict(), |
| 37 | + roi_ji=dict(), |
| 38 | + roi_voldiff=dict(), |
| 39 | + volume_difference=dict(), |
| 40 | + ) |
| 41 | + outputs = Overlap.output_spec() |
| 42 | + |
| 43 | + for key, metadata in output_map.items(): |
| 44 | + for metakey, value in metadata.items(): |
| 45 | + yield assert_equal, getattr(outputs.traits()[key], metakey), value |
| 46 | + |
0 commit comments