Skip to content

Commit f3e22f8

Browse files
committed
Added tests for new interfaces
1 parent b3eb47b commit f3e22f8

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from nipype.testing import assert_equal
3+
from nipype.interfaces.elastix.registration import AnalyzeWarp
4+
5+
def test_AnalyzeWarp_inputs():
6+
input_map = dict(args=dict(argstr='%s',
7+
),
8+
environ=dict(nohash=True,
9+
usedefault=True,
10+
),
11+
ignore_exception=dict(nohash=True,
12+
usedefault=True,
13+
),
14+
num_threads=dict(argstr='-threads %01d',
15+
),
16+
output_path=dict(argstr='-out %s',
17+
mandatory=True,
18+
usedefault=True,
19+
),
20+
terminal_output=dict(mandatory=True,
21+
nohash=True,
22+
),
23+
transform_file=dict(argstr='-tp %s',
24+
mandatory=True,
25+
),
26+
)
27+
inputs = AnalyzeWarp.input_spec()
28+
29+
for key, metadata in input_map.items():
30+
for metakey, value in metadata.items():
31+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
32+
33+
def test_AnalyzeWarp_outputs():
34+
output_map = dict(disp_field=dict(),
35+
jacdet_map=dict(),
36+
jacmat_map=dict(),
37+
)
38+
outputs = AnalyzeWarp.output_spec()
39+
40+
for key, metadata in output_map.items():
41+
for metakey, value in metadata.items():
42+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
43+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from nipype.testing import assert_equal
3+
from nipype.interfaces.elastix.registration import ApplyWarp
4+
5+
def test_ApplyWarp_inputs():
6+
input_map = dict(args=dict(argstr='%s',
7+
),
8+
environ=dict(nohash=True,
9+
usedefault=True,
10+
),
11+
ignore_exception=dict(nohash=True,
12+
usedefault=True,
13+
),
14+
moving_image=dict(argstr='-in %s',
15+
mandatory=True,
16+
),
17+
num_threads=dict(argstr='-threads %01d',
18+
),
19+
output_path=dict(argstr='-out %s',
20+
mandatory=True,
21+
usedefault=True,
22+
),
23+
terminal_output=dict(mandatory=True,
24+
nohash=True,
25+
),
26+
transform_file=dict(argstr='-tp %s',
27+
mandatory=True,
28+
),
29+
)
30+
inputs = ApplyWarp.input_spec()
31+
32+
for key, metadata in input_map.items():
33+
for metakey, value in metadata.items():
34+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
35+
36+
def test_ApplyWarp_outputs():
37+
output_map = dict(warped_file=dict(),
38+
)
39+
outputs = ApplyWarp.output_spec()
40+
41+
for key, metadata in output_map.items():
42+
for metakey, value in metadata.items():
43+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
44+

0 commit comments

Comments
 (0)