Skip to content

Commit a8fa089

Browse files
committed
new/updated autotests
1 parent b0c95e0 commit a8fa089

File tree

3 files changed

+155
-12
lines changed

3 files changed

+155
-12
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..utils import Localstat
4+
5+
6+
def test_Localstat_inputs():
7+
input_map = dict(
8+
args=dict(argstr='%s', ),
9+
automask=dict(argstr='-automask', ),
10+
environ=dict(
11+
nohash=True,
12+
usedefault=True,
13+
),
14+
grid_rmode=dict(
15+
argstr='-grid_rmode %s',
16+
requires=['reduce_restore_grid'],
17+
),
18+
in_file=dict(
19+
argstr='%s',
20+
mandatory=True,
21+
position=-1,
22+
),
23+
mask_file=dict(argstr='-mask %s', ),
24+
neighborhood=dict(
25+
argstr="-nbhd '%s(%s)'",
26+
mandatory=True,
27+
),
28+
nonmask=dict(argstr='-use_nonmask', ),
29+
num_threads=dict(
30+
nohash=True,
31+
usedefault=True,
32+
),
33+
out_file=dict(
34+
argstr='-prefix %s',
35+
keep_extension=True,
36+
name_source='in_file',
37+
name_template='%s_localstat',
38+
position=0,
39+
),
40+
outputtype=dict(),
41+
overwrite=dict(argstr='-overwrite', ),
42+
quiet=dict(argstr='-quiet', ),
43+
reduce_grid=dict(
44+
argstr='-reduce_grid %s',
45+
xor=['reduce_restore_grid', 'reduce_max_vox'],
46+
),
47+
reduce_max_vox=dict(
48+
argstr='-reduce_max_vox %s',
49+
xor=['reduce_restore_grid', 'reduce_grid'],
50+
),
51+
reduce_restore_grid=dict(
52+
argstr='-reduce_restore_grid %s',
53+
xor=['reduce_max_vox', 'reduce_grid'],
54+
),
55+
stat=dict(
56+
argstr='-stat %s...',
57+
mandatory=True,
58+
),
59+
)
60+
inputs = Localstat.input_spec()
61+
62+
for key, metadata in list(input_map.items()):
63+
for metakey, value in list(metadata.items()):
64+
assert getattr(inputs.traits()[key], metakey) == value
65+
def test_Localstat_outputs():
66+
output_map = dict(out_file=dict(), )
67+
outputs = Localstat.output_spec()
68+
69+
for key, metadata in list(output_map.items()):
70+
for metakey, value in list(metadata.items()):
71+
assert getattr(outputs.traits()[key], metakey) == value

nipype/interfaces/afni/tests/test_auto_ROIStats.py

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,42 @@
66
def test_ROIStats_inputs():
77
input_map = dict(
88
args=dict(argstr='%s', ),
9+
debug=dict(argstr='-debug', ),
910
environ=dict(
1011
nohash=True,
1112
usedefault=True,
1213
),
14+
format1D=dict(
15+
argstr='-1Dformat',
16+
xor=['format1DR'],
17+
),
18+
format1DR=dict(
19+
argstr='-1DRformat',
20+
xor=['format1D'],
21+
),
1322
in_file=dict(
1423
argstr='%s',
1524
mandatory=True,
16-
position=-1,
25+
position=-2,
1726
),
18-
mask=dict(
19-
argstr='-mask %s',
20-
position=3,
21-
),
22-
mask_f2short=dict(
23-
argstr='-mask_f2short',
24-
position=2,
27+
mask_f2short=dict(argstr='-mask_f2short', ),
28+
mask_file=dict(argstr='-mask %s', ),
29+
nobriklab=dict(argstr='-nobriklab', ),
30+
nomeanout=dict(argstr='-nomeanout', ),
31+
num_roi=dict(argstr='-numroi %s', ),
32+
out_file=dict(
33+
argstr='> %s',
34+
keep_extension=False,
35+
name_source='in_file',
36+
name_template='%s_roistat.1D',
37+
position=-1,
2538
),
26-
quiet=dict(
27-
argstr='-quiet',
28-
position=1,
39+
quiet=dict(argstr='-quiet', ),
40+
roisel=dict(argstr='-roisel %s', ),
41+
stat=dict(argstr='%s...', ),
42+
zerofill=dict(
43+
argstr='-zerofill %s',
44+
requires=['num_roi'],
2945
),
3046
)
3147
inputs = ROIStats.input_spec()
@@ -34,7 +50,7 @@ def test_ROIStats_inputs():
3450
for metakey, value in list(metadata.items()):
3551
assert getattr(inputs.traits()[key], metakey) == value
3652
def test_ROIStats_outputs():
37-
output_map = dict(stats=dict(), )
53+
output_map = dict(out_file=dict(), )
3854
outputs = ROIStats.output_spec()
3955

4056
for key, metadata in list(output_map.items()):
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..utils import ReHo
4+
5+
6+
def test_ReHo_inputs():
7+
input_map = dict(
8+
args=dict(argstr='%s', ),
9+
chi_sq=dict(argstr='-chi_sq', ),
10+
ellipsoid=dict(
11+
argstr='-neigh_X %s -neigh_Y %s -neigh_Z %s',
12+
xor=['sphere', 'neighborhood'],
13+
),
14+
environ=dict(
15+
nohash=True,
16+
usedefault=True,
17+
),
18+
in_file=dict(
19+
argstr='-inset %s',
20+
mandatory=True,
21+
position=1,
22+
),
23+
label_set=dict(argstr='-in_rois %s', ),
24+
mask=dict(argstr='-mask %s', ),
25+
neighborhood=dict(
26+
argstr='-nneigh %s',
27+
xor=['sphere', 'ellipsoid'],
28+
),
29+
out_file=dict(
30+
argstr='-prefix %s',
31+
keep_extension=True,
32+
name_source='in_file',
33+
name_template='%s_localstat',
34+
position=0,
35+
),
36+
overwrite=dict(argstr='-overwrite', ),
37+
sphere=dict(
38+
argstr='-neigh_RAD %s',
39+
xor=['neighborhood', 'ellipsoid'],
40+
),
41+
)
42+
inputs = ReHo.input_spec()
43+
44+
for key, metadata in list(input_map.items()):
45+
for metakey, value in list(metadata.items()):
46+
assert getattr(inputs.traits()[key], metakey) == value
47+
def test_ReHo_outputs():
48+
output_map = dict(
49+
out_file=dict(),
50+
out_vals=dict(),
51+
)
52+
outputs = ReHo.output_spec()
53+
54+
for key, metadata in list(output_map.items()):
55+
for metakey, value in list(metadata.items()):
56+
assert getattr(outputs.traits()[key], metakey) == value

0 commit comments

Comments
 (0)