Skip to content

Commit 42f0663

Browse files
committed
Merge pull request #1346 from chrisfilo/fix/missing_tests
added missing auto tests
2 parents 038223f + cd8c98e commit 42f0663

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ...testing import assert_equal
3+
from ..metrics import ErrorMap
4+
5+
6+
def test_ErrorMap_inputs():
7+
input_map = dict(ignore_exception=dict(nohash=True,
8+
usedefault=True,
9+
),
10+
in_ref=dict(mandatory=True,
11+
),
12+
in_tst=dict(mandatory=True,
13+
),
14+
mask=dict(),
15+
metric=dict(mandatory=True,
16+
usedefault=True,
17+
),
18+
out_map=dict(),
19+
)
20+
inputs = ErrorMap.input_spec()
21+
22+
for key, metadata in list(input_map.items()):
23+
for metakey, value in list(metadata.items()):
24+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
25+
26+
27+
def test_ErrorMap_outputs():
28+
output_map = dict(distance=dict(),
29+
out_map=dict(),
30+
)
31+
outputs = ErrorMap.output_spec()
32+
33+
for key, metadata in list(output_map.items()):
34+
for metakey, value in list(metadata.items()):
35+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ...testing import assert_equal
3+
from ..misc import Overlap
4+
5+
6+
def test_Overlap_inputs():
7+
input_map = dict(bg_overlap=dict(mandatory=True,
8+
usedefault=True,
9+
),
10+
ignore_exception=dict(nohash=True,
11+
usedefault=True,
12+
),
13+
mask_volume=dict(),
14+
out_file=dict(usedefault=True,
15+
),
16+
vol_units=dict(mandatory=True,
17+
usedefault=True,
18+
),
19+
volume1=dict(mandatory=True,
20+
),
21+
volume2=dict(mandatory=True,
22+
),
23+
weighting=dict(usedefault=True,
24+
),
25+
)
26+
inputs = Overlap.input_spec()
27+
28+
for key, metadata in list(input_map.items()):
29+
for metakey, value in list(metadata.items()):
30+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
31+
32+
33+
def test_Overlap_outputs():
34+
output_map = dict(dice=dict(),
35+
diff_file=dict(),
36+
jaccard=dict(),
37+
labels=dict(),
38+
roi_di=dict(),
39+
roi_ji=dict(),
40+
roi_voldiff=dict(),
41+
volume_difference=dict(),
42+
)
43+
outputs = Overlap.output_spec()
44+
45+
for key, metadata in list(output_map.items()):
46+
for metakey, value in list(metadata.items()):
47+
yield assert_equal, getattr(outputs.traits()[key], metakey), value

0 commit comments

Comments
 (0)