Skip to content

Commit d8119d3

Browse files
committed
Auto-generated unit tests for new afni interfaces
1 parent 3fc3821 commit d8119d3

File tree

6 files changed

+347
-0
lines changed

6 files changed

+347
-0
lines changed
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 ..preprocess import ClipLevel
4+
5+
6+
def test_ClipLevel_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
doall=dict(argstr='-doall',
10+
position=3,
11+
xor='grad',
12+
),
13+
environ=dict(nohash=True,
14+
usedefault=True,
15+
),
16+
grad=dict(argstr='-grad %s',
17+
position=3,
18+
xor='doall',
19+
),
20+
ignore_exception=dict(nohash=True,
21+
usedefault=True,
22+
),
23+
in_file=dict(argstr='%s',
24+
mandatory=True,
25+
position=-1,
26+
),
27+
mfrac=dict(argstr='-mfrac %s',
28+
position=2,
29+
),
30+
terminal_output=dict(nohash=True,
31+
),
32+
)
33+
inputs = ClipLevel.input_spec()
34+
35+
for key, metadata in list(input_map.items()):
36+
for metakey, value in list(metadata.items()):
37+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
38+
39+
40+
def test_ClipLevel_outputs():
41+
output_map = dict(clip_val=dict(),
42+
)
43+
outputs = ClipLevel.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
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ....testing import assert_equal
3+
from ..preprocess import DegreeCentrality
4+
5+
6+
def test_DegreeCentrality_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
autoclip=dict(argstr='-autoclip',
10+
),
11+
automask=dict(argstr='-automask',
12+
),
13+
environ=dict(nohash=True,
14+
usedefault=True,
15+
),
16+
ignore_exception=dict(nohash=True,
17+
usedefault=True,
18+
),
19+
in_file=dict(argstr='%s',
20+
copyfile=False,
21+
mandatory=True,
22+
position=-1,
23+
),
24+
mask=dict(argstr='-mask %s',
25+
),
26+
oned_file=dict(argstr='-out1D %s',
27+
mandatory=False,
28+
),
29+
out_file=dict(argstr='-prefix %s',
30+
name_source=['in_file'],
31+
name_template='%s_afni',
32+
),
33+
outputtype=dict(),
34+
polort=dict(argstr='-polort %d',
35+
),
36+
sparsity=dict(argstr='-sparsity %f',
37+
),
38+
terminal_output=dict(nohash=True,
39+
),
40+
thresh=dict(argstr='-thresh %f',
41+
),
42+
)
43+
inputs = DegreeCentrality.input_spec()
44+
45+
for key, metadata in list(input_map.items()):
46+
for metakey, value in list(metadata.items()):
47+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
48+
49+
50+
def test_DegreeCentrality_outputs():
51+
output_map = dict(oned_file=dict(),
52+
out_file=dict(),
53+
)
54+
outputs = DegreeCentrality.output_spec()
55+
56+
for key, metadata in list(output_map.items()):
57+
for metakey, value in list(metadata.items()):
58+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ....testing import assert_equal
3+
from ..preprocess import ECM
4+
5+
6+
def test_ECM_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
autoclip=dict(argstr='-autoclip',
10+
),
11+
automask=dict(argstr='-automask',
12+
),
13+
environ=dict(nohash=True,
14+
usedefault=True,
15+
),
16+
eps=dict(argstr='-eps %f',
17+
),
18+
fecm=dict(argstr='-fecm',
19+
),
20+
full=dict(argstr='-full',
21+
),
22+
ignore_exception=dict(nohash=True,
23+
usedefault=True,
24+
),
25+
in_file=dict(argstr='%s',
26+
copyfile=False,
27+
mandatory=True,
28+
position=-1,
29+
),
30+
mask=dict(argstr='-mask %s',
31+
),
32+
max_iter=dict(argstr='-max_iter %d',
33+
),
34+
memory=dict(argstr='-memory %f',
35+
),
36+
out_file=dict(argstr='-prefix %s',
37+
name_source=['in_file'],
38+
name_template='%s_afni',
39+
),
40+
outputtype=dict(),
41+
polort=dict(argstr='-polort %d',
42+
),
43+
scale=dict(argstr='-scale %f',
44+
),
45+
shift=dict(argstr='-shift %f',
46+
),
47+
sparsity=dict(argstr='-sparsity %f',
48+
),
49+
terminal_output=dict(nohash=True,
50+
),
51+
thresh=dict(argstr='-thresh %f',
52+
),
53+
)
54+
inputs = ECM.input_spec()
55+
56+
for key, metadata in list(input_map.items()):
57+
for metakey, value in list(metadata.items()):
58+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
59+
60+
61+
def test_ECM_outputs():
62+
output_map = dict(out_file=dict(),
63+
)
64+
outputs = ECM.output_spec()
65+
66+
for key, metadata in list(output_map.items()):
67+
for metakey, value in list(metadata.items()):
68+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ....testing import assert_equal
3+
from ..preprocess import LFCD
4+
5+
6+
def test_LFCD_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
autoclip=dict(argstr='-autoclip',
10+
),
11+
automask=dict(argstr='-automask',
12+
),
13+
environ=dict(nohash=True,
14+
usedefault=True,
15+
),
16+
ignore_exception=dict(nohash=True,
17+
usedefault=True,
18+
),
19+
in_file=dict(argstr='%s',
20+
copyfile=False,
21+
mandatory=True,
22+
position=-1,
23+
),
24+
mask=dict(argstr='-mask %s',
25+
),
26+
out_file=dict(argstr='-prefix %s',
27+
name_source=['in_file'],
28+
name_template='%s_afni',
29+
),
30+
outputtype=dict(),
31+
polort=dict(argstr='-polort %d',
32+
),
33+
terminal_output=dict(nohash=True,
34+
),
35+
thresh=dict(argstr='-thresh %f',
36+
),
37+
)
38+
inputs = LFCD.input_spec()
39+
40+
for key, metadata in list(input_map.items()):
41+
for metakey, value in list(metadata.items()):
42+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
43+
44+
45+
def test_LFCD_outputs():
46+
output_map = dict(out_file=dict(),
47+
)
48+
outputs = LFCD.output_spec()
49+
50+
for key, metadata in list(output_map.items()):
51+
for metakey, value in list(metadata.items()):
52+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ....testing import assert_equal
3+
from ..preprocess import MaskTool
4+
5+
6+
def test_MaskTool_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
count=dict(argstr='-count',
10+
position=2,
11+
),
12+
datum=dict(argstr='-datum %s',
13+
),
14+
dilate_inputs=dict(argstr='-dilate_inputs %s',
15+
),
16+
dilate_results=dict(argstr='-dilate_results %s',
17+
),
18+
environ=dict(nohash=True,
19+
usedefault=True,
20+
),
21+
fill_dirs=dict(argstr='-fill_dirs %s',
22+
requires=['fill_holes'],
23+
),
24+
fill_holes=dict(argstr='-fill_holes',
25+
),
26+
frac=dict(argstr='-frac %s',
27+
),
28+
ignore_exception=dict(nohash=True,
29+
usedefault=True,
30+
),
31+
in_file=dict(argstr='-input %s',
32+
copyfile=False,
33+
mandatory=True,
34+
position=-1,
35+
),
36+
inter=dict(argstr='-inter',
37+
),
38+
out_file=dict(argstr='-prefix %s',
39+
name_source='in_file',
40+
name_template='%s_mask',
41+
),
42+
outputtype=dict(),
43+
terminal_output=dict(nohash=True,
44+
),
45+
union=dict(argstr='-union',
46+
),
47+
)
48+
inputs = MaskTool.input_spec()
49+
50+
for key, metadata in list(input_map.items()):
51+
for metakey, value in list(metadata.items()):
52+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
53+
54+
55+
def test_MaskTool_outputs():
56+
output_map = dict(out_file=dict(),
57+
)
58+
outputs = MaskTool.output_spec()
59+
60+
for key, metadata in list(output_map.items()):
61+
for metakey, value in list(metadata.items()):
62+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ....testing import assert_equal
3+
from ..preprocess import Seg
4+
5+
6+
def test_Seg_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
bias_classes=dict(argstr='-bias_classes %s',
10+
),
11+
bias_fwhm=dict(argstr='-bias_fwhm %f',
12+
),
13+
blur_meth=dict(argstr='-blur_meth %s',
14+
),
15+
bmrf=dict(argstr='-bmrf %f',
16+
),
17+
classes=dict(argstr='-classes %s',
18+
),
19+
environ=dict(nohash=True,
20+
usedefault=True,
21+
),
22+
ignore_exception=dict(nohash=True,
23+
usedefault=True,
24+
),
25+
in_file=dict(argstr='-anat %s',
26+
copyfile=True,
27+
mandatory=True,
28+
position=-1,
29+
),
30+
main_N=dict(argstr='-main_N %d',
31+
),
32+
mask=dict(argstr='-mask %s',
33+
exists=True,
34+
mandatory=True,
35+
position=-2,
36+
),
37+
mixfloor=dict(argstr='-mixfloor %f',
38+
),
39+
mixfrac=dict(argstr='-mixfrac %s',
40+
),
41+
prefix=dict(argstr='-prefix %s',
42+
),
43+
terminal_output=dict(nohash=True,
44+
),
45+
)
46+
inputs = Seg.input_spec()
47+
48+
for key, metadata in list(input_map.items()):
49+
for metakey, value in list(metadata.items()):
50+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
51+
52+
53+
def test_Seg_outputs():
54+
output_map = dict(out_file=dict(),
55+
)
56+
outputs = Seg.output_spec()
57+
58+
for key, metadata in list(output_map.items()):
59+
for metakey, value in list(metadata.items()):
60+
yield assert_equal, getattr(outputs.traits()[key], metakey), value

0 commit comments

Comments
 (0)