Skip to content

Commit 5138a4c

Browse files
committed
add auto-test
1 parent c329fc0 commit 5138a4c

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..utils import Undump
4+
5+
6+
def test_Undump_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
coordinates_specification=dict(argstr='-%s',
10+
),
11+
datatype=dict(argstr='-datum %s',
12+
),
13+
default_value=dict(argstr='-dval %f',
14+
),
15+
environ=dict(nohash=True,
16+
usedefault=True,
17+
),
18+
fill_value=dict(argstr='-fval %f',
19+
),
20+
head_only=dict(argstr='-head_only',
21+
),
22+
ignore_exception=dict(nohash=True,
23+
usedefault=True,
24+
),
25+
in_file=dict(argstr='-master %s',
26+
copyfile=False,
27+
mandatory=True,
28+
position=-1,
29+
),
30+
mask_file=dict(argstr='-mask %s',
31+
),
32+
out_file=dict(argstr='-prefix %s',
33+
name_source='in_file',
34+
),
35+
outputtype=dict(),
36+
srad=dict(argstr='-srad -%f',
37+
),
38+
terminal_output=dict(nohash=True,
39+
),
40+
)
41+
inputs = Undump.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_Undump_outputs():
49+
output_map = dict(out_file=dict(),
50+
)
51+
outputs = Undump.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

Comments
 (0)