Skip to content

Commit a724b13

Browse files
authored
Merge pull request #1 from satra/fix/autotests
Fix/autotests
2 parents 82007bc + 34eab67 commit a724b13

20 files changed

+1238
-91
lines changed

nipype/interfaces/afni/model.py

Lines changed: 320 additions & 83 deletions
Large diffs are not rendered by default.
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 Axialize
4+
5+
6+
def test_Axialize_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
axial=dict(argstr='-axial',
10+
xor=['coronal', 'sagittal'],
11+
),
12+
coronal=dict(argstr='-coronal',
13+
xor=['sagittal', 'axial'],
14+
),
15+
environ=dict(nohash=True,
16+
usedefault=True,
17+
),
18+
ignore_exception=dict(nohash=True,
19+
usedefault=True,
20+
),
21+
in_file=dict(argstr='%s',
22+
copyfile=False,
23+
mandatory=True,
24+
position=-2,
25+
),
26+
orientation=dict(argstr='-orient %s',
27+
),
28+
out_file=dict(argstr='-prefix %s',
29+
name_source='in_file',
30+
name_template='%s_axialize',
31+
),
32+
outputtype=dict(),
33+
sagittal=dict(argstr='-sagittal',
34+
xor=['coronal', 'axial'],
35+
),
36+
terminal_output=dict(nohash=True,
37+
),
38+
verb=dict(argstr='-verb',
39+
),
40+
)
41+
inputs = Axialize.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_Axialize_outputs():
49+
output_map = dict(out_file=dict(),
50+
)
51+
outputs = Axialize.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

nipype/interfaces/afni/tests/test_auto_BrickStat.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,23 @@ def test_BrickStat_inputs():
1919
mask=dict(argstr='-mask %s',
2020
position=2,
2121
),
22+
max=dict(argstr='-max',
23+
),
24+
mean=dict(argstr='-mean',
25+
),
2226
min=dict(argstr='-min',
2327
position=1,
2428
),
29+
percentile=dict(argstr='-percentile %.3f %.3f %.3f',
30+
),
31+
slow=dict(argstr='-slow',
32+
),
33+
sum=dict(argstr='-sum',
34+
),
2535
terminal_output=dict(nohash=True,
2636
),
37+
var=dict(argstr='-var',
38+
),
2739
)
2840
inputs = BrickStat.input_spec()
2941

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..utils import Cat
4+
5+
6+
def test_Cat_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
environ=dict(nohash=True,
10+
usedefault=True,
11+
),
12+
ignore_exception=dict(nohash=True,
13+
usedefault=True,
14+
),
15+
in_files=dict(argstr='%s',
16+
mandatory=True,
17+
position=-2,
18+
),
19+
keepfree=dict(argstr='-nonfixed',
20+
),
21+
omitconst=dict(argstr='-nonconst',
22+
),
23+
out_cint=dict(xor=['out_format', 'out_nice', 'out_double', 'out_fint', 'out_int'],
24+
),
25+
out_double=dict(argstr='-d',
26+
xor=['out_format', 'out_nice', 'out_int', 'out_fint', 'out_cint'],
27+
),
28+
out_file=dict(argstr='> %s',
29+
mandatory=True,
30+
position=-1,
31+
),
32+
out_fint=dict(argstr='-f',
33+
xor=['out_format', 'out_nice', 'out_double', 'out_int', 'out_cint'],
34+
),
35+
out_format=dict(argstr='-form %s',
36+
xor=['out_int', 'out_nice', 'out_double', 'out_fint', 'out_cint'],
37+
),
38+
out_int=dict(argstr='-i',
39+
xor=['out_format', 'out_nice', 'out_double', 'out_fint', 'out_cint'],
40+
),
41+
out_nice=dict(argstr='-n',
42+
xor=['out_format', 'out_int', 'out_double', 'out_fint', 'out_cint'],
43+
),
44+
outputtype=dict(),
45+
sel=dict(argstr='-sel %s',
46+
),
47+
stack=dict(argstr='-stack',
48+
),
49+
terminal_output=dict(nohash=True,
50+
),
51+
)
52+
inputs = Cat.input_spec()
53+
54+
for key, metadata in list(input_map.items()):
55+
for metakey, value in list(metadata.items()):
56+
assert getattr(inputs.traits()[key], metakey) == value
57+
58+
59+
def test_Cat_outputs():
60+
output_map = dict(out_file=dict(),
61+
)
62+
outputs = Cat.output_spec()
63+
64+
for key, metadata in list(output_map.items()):
65+
for metakey, value in list(metadata.items()):
66+
assert getattr(outputs.traits()[key], metakey) == value

nipype/interfaces/afni/tests/test_auto_Deconvolve.py

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ def test_Deconvolve_inputs():
88
),
99
TR_1D=dict(argstr='-TR_1D %f',
1010
),
11+
allzero_OK=dict(argstr='-allzero_OK',
12+
),
1113
args=dict(argstr='%s',
1214
),
1315
automask=dict(argstr='-automask',
1416
),
1517
censor=dict(argstr='-censor %s',
1618
),
19+
dmbase=dict(argstr='-dmbase',
20+
),
21+
dname=dict(argstr='-D%s=%s',
22+
),
1723
environ=dict(nohash=True,
1824
usedefault=True,
1925
),
@@ -25,16 +31,20 @@ def test_Deconvolve_inputs():
2531
xor=['local_times'],
2632
),
2733
glt_label=dict(argstr='-glt_label %d %s...',
34+
position=-1,
2835
requires=['gltsym'],
2936
),
3037
gltsym=dict(argstr="-gltsym 'SYM: %s'...",
38+
position=-2,
39+
),
40+
goforit=dict(argstr='-GOFORIT %i',
3141
),
3242
ignore_exception=dict(nohash=True,
3343
usedefault=True,
3444
),
3545
in_files=dict(argstr='-input %s',
3646
copyfile=False,
37-
mandatory=True,
47+
position=0,
3848
sep=' ',
3949
),
4050
input1D=dict(argstr='-input1D %s',
@@ -50,13 +60,19 @@ def test_Deconvolve_inputs():
5060
),
5161
noblock=dict(argstr='-noblock',
5262
),
63+
nocond=dict(argstr='-nocond',
64+
),
65+
nodmbase=dict(argstr='-nodmbase',
66+
),
5367
nolegendre=dict(argstr='-nolegendre',
5468
),
69+
nosvd=dict(argstr='-nosvd',
70+
),
5571
num_glt=dict(argstr='-num_glt %d',
56-
position=1,
72+
position=-3,
5773
),
5874
num_stimts=dict(argstr='-num_stimts %d',
59-
position=0,
75+
position=-6,
6076
),
6177
ortvec=dict(argstr='ortvec %s',
6278
),
@@ -65,18 +81,26 @@ def test_Deconvolve_inputs():
6581
outputtype=dict(),
6682
polort=dict(argstr='-polort %d',
6783
),
84+
rmsmin=dict(argstr='-rmsmin %f',
85+
),
6886
rout=dict(argstr='-rout',
6987
),
7088
sat=dict(argstr='-sat',
7189
xor=['trans'],
7290
),
91+
singvals=dict(argstr='-singvals',
92+
),
7393
stim_label=dict(argstr='-stim_label %d %s...',
94+
position=-4,
7495
requires=['stim_times'],
7596
),
7697
stim_times=dict(argstr="-stim_times %d %s '%s'...",
98+
position=-5,
7799
),
78100
stim_times_subtract=dict(argstr='-stim_times_subtract %f',
79101
),
102+
svd=dict(argstr='-svd',
103+
),
80104
terminal_output=dict(nohash=True,
81105
),
82106
tout=dict(argstr='-tout',
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 __future__ import unicode_literals
3+
from ..utils import NwarpApply
4+
5+
6+
def test_NwarpApply_inputs():
7+
input_map = dict(ainterp=dict(argstr='-ainterp %s',
8+
),
9+
args=dict(argstr='%s',
10+
),
11+
environ=dict(nohash=True,
12+
usedefault=True,
13+
),
14+
ignore_exception=dict(nohash=True,
15+
usedefault=True,
16+
),
17+
in_file=dict(argstr='-source %s',
18+
mandatory=True,
19+
),
20+
interp=dict(argstr='-interp %s',
21+
),
22+
inv_warp=dict(argstr='-iwarp',
23+
),
24+
master=dict(argstr='-master %s',
25+
),
26+
out_file=dict(argstr='-prefix %s',
27+
name_source='in_file',
28+
name_template='%s_Nwarp',
29+
),
30+
quiet=dict(argstr='-quiet',
31+
xor=['verb'],
32+
),
33+
short=dict(argstr='-short',
34+
),
35+
terminal_output=dict(nohash=True,
36+
),
37+
verb=dict(argstr='-verb',
38+
xor=['quiet'],
39+
),
40+
warp=dict(argstr='-nwarp %s',
41+
mandatory=True,
42+
),
43+
)
44+
inputs = NwarpApply.input_spec()
45+
46+
for key, metadata in list(input_map.items()):
47+
for metakey, value in list(metadata.items()):
48+
assert getattr(inputs.traits()[key], metakey) == value
49+
50+
51+
def test_NwarpApply_outputs():
52+
output_map = dict(out_file=dict(),
53+
)
54+
outputs = NwarpApply.output_spec()
55+
56+
for key, metadata in list(output_map.items()):
57+
for metakey, value in list(metadata.items()):
58+
assert getattr(outputs.traits()[key], metakey) == value

0 commit comments

Comments
 (0)