Skip to content

Commit 2ba976e

Browse files
committed
Added tests
1 parent 8239046 commit 2ba976e

File tree

6 files changed

+257
-1
lines changed

6 files changed

+257
-1
lines changed
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 nipype.testing import assert_equal
3+
from nipype.interfaces.afni.preprocess import Eval
4+
5+
def test_Eval_inputs():
6+
input_map = dict(args=dict(argstr='%s',
7+
),
8+
environ=dict(nohash=True,
9+
usedefault=True,
10+
),
11+
expr=dict(argstr='-expr "%s"',
12+
mandatory=True,
13+
position=3,
14+
),
15+
ignore_exception=dict(nohash=True,
16+
usedefault=True,
17+
),
18+
in_file_a=dict(argstr='-a %s',
19+
mandatory=True,
20+
position=0,
21+
),
22+
in_file_b=dict(argstr=' -b %s',
23+
position=1,
24+
),
25+
in_file_c=dict(argstr=' -c %s',
26+
position=2,
27+
),
28+
other=dict(argstr='',
29+
),
30+
out1D=dict(argstr='-1D',
31+
),
32+
out_file=dict(argstr='-prefix %s',
33+
name_source='in_file_a',
34+
name_template='%s_calc',
35+
),
36+
outputtype=dict(),
37+
single_idx=dict(),
38+
start_idx=dict(requires=['stop_idx'],
39+
),
40+
stop_idx=dict(requires=['start_idx'],
41+
),
42+
terminal_output=dict(mandatory=True,
43+
nohash=True,
44+
),
45+
)
46+
inputs = Eval.input_spec()
47+
48+
for key, metadata in input_map.items():
49+
for metakey, value in metadata.items():
50+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
51+
52+
def test_Eval_outputs():
53+
output_map = dict(out_file=dict(),
54+
)
55+
outputs = Eval.output_spec()
56+
57+
for key, metadata in output_map.items():
58+
for metakey, value in metadata.items():
59+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
60+
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 nipype.testing import assert_equal
3+
from nipype.interfaces.afni.preprocess import Means
4+
5+
def test_Means_inputs():
6+
input_map = dict(args=dict(argstr='%s',
7+
),
8+
count=dict(argstr='-count',
9+
),
10+
environ=dict(nohash=True,
11+
usedefault=True,
12+
),
13+
ignore_exception=dict(nohash=True,
14+
usedefault=True,
15+
),
16+
in_file_a=dict(argstr='%s',
17+
mandatory=True,
18+
position=0,
19+
),
20+
in_file_b=dict(argstr='%s',
21+
position=1,
22+
),
23+
mask_inter=dict(argstr='-mask_inter',
24+
),
25+
mask_union=dict(argstr='-mask_union',
26+
),
27+
non_zero=dict(argstr='-non_zero',
28+
),
29+
out_file=dict(argstr='-prefix %s',
30+
name_source='in_file_a',
31+
name_template='%s_mean',
32+
),
33+
outputtype=dict(),
34+
scale=dict(argstr='-%sscale',
35+
),
36+
sqr=dict(argstr='-sqr',
37+
),
38+
std_dev=dict(argstr='-stdev',
39+
),
40+
summ=dict(argstr='-sum',
41+
),
42+
terminal_output=dict(mandatory=True,
43+
nohash=True,
44+
),
45+
)
46+
inputs = Means.input_spec()
47+
48+
for key, metadata in input_map.items():
49+
for metakey, value in metadata.items():
50+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
51+
52+
def test_Means_outputs():
53+
output_map = dict(out_file=dict(),
54+
)
55+
outputs = Means.output_spec()
56+
57+
for key, metadata in output_map.items():
58+
for metakey, value in metadata.items():
59+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
60+
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 nipype.testing import assert_equal
3+
from nipype.interfaces.afni.svm import SVMTest
4+
5+
def test_SVMTest_inputs():
6+
input_map = dict(args=dict(argstr='%s',
7+
),
8+
classout=dict(argstr='-classout',
9+
),
10+
environ=dict(nohash=True,
11+
usedefault=True,
12+
),
13+
ignore_exception=dict(nohash=True,
14+
usedefault=True,
15+
),
16+
in_file=dict(argstr='-testvol %s',
17+
mandatory=True,
18+
),
19+
model=dict(argstr='-model %s',
20+
exists=True,
21+
mandatory=True,
22+
),
23+
multiclass=dict(argstr='-multiclass %s',
24+
),
25+
nodetrend=dict(argstr='-nodetrend',
26+
),
27+
nopredcensord=dict(argstr='-nopredcensord',
28+
),
29+
options=dict(argstr='%s',
30+
),
31+
out_file=dict(argstr='-predictions %s',
32+
name_template='%s_predictions',
33+
),
34+
outputtype=dict(),
35+
terminal_output=dict(mandatory=True,
36+
nohash=True,
37+
),
38+
testlabels=dict(argstr='-testlabels %s',
39+
),
40+
)
41+
inputs = SVMTest.input_spec()
42+
43+
for key, metadata in input_map.items():
44+
for metakey, value in metadata.items():
45+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
46+
47+
def test_SVMTest_outputs():
48+
output_map = dict(out_file=dict(),
49+
)
50+
outputs = SVMTest.output_spec()
51+
52+
for key, metadata in output_map.items():
53+
for metakey, value in metadata.items():
54+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
55+
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from nipype.testing import assert_equal
3+
from nipype.interfaces.afni.svm import SVMTrain
4+
5+
def test_SVMTrain_inputs():
6+
input_map = dict(alphas=dict(argstr='-alpha %s',
7+
name_source='in_file',
8+
name_template='%s_alphas',
9+
suffix='_alphas',
10+
),
11+
args=dict(argstr='%s',
12+
),
13+
censor=dict(argstr='-censor %s',
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='-trainvol %s',
22+
copyfile=False,
23+
mandatory=True,
24+
),
25+
kernel=dict(argstr='-kernel %s',
26+
),
27+
mask=dict(argstr='-mask %s',
28+
copyfile=False,
29+
position=-1,
30+
),
31+
max_iterations=dict(argstr='-max_iterations %d',
32+
),
33+
model=dict(argstr='-model %s',
34+
name_source='in_file',
35+
name_template='%s_model',
36+
suffix='_model',
37+
),
38+
nomodelmask=dict(argstr='-nomodelmask',
39+
),
40+
options=dict(argstr='%s',
41+
),
42+
out_file=dict(argstr='-bucket %s',
43+
name_source='in_file',
44+
name_template='%s_vectors',
45+
suffix='_bucket',
46+
),
47+
outputtype=dict(),
48+
terminal_output=dict(mandatory=True,
49+
nohash=True,
50+
),
51+
trainlabels=dict(argstr='-trainlabels %s',
52+
),
53+
ttype=dict(argstr='-type %s',
54+
mandatory=True,
55+
),
56+
w_out=dict(argstr='-wout',
57+
),
58+
)
59+
inputs = SVMTrain.input_spec()
60+
61+
for key, metadata in input_map.items():
62+
for metakey, value in metadata.items():
63+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
64+
65+
def test_SVMTrain_outputs():
66+
output_map = dict(alphas=dict(),
67+
model=dict(),
68+
out_file=dict(),
69+
)
70+
outputs = SVMTrain.output_spec()
71+
72+
for key, metadata in output_map.items():
73+
for metakey, value in metadata.items():
74+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
75+

nipype/interfaces/afni/tests/test_auto_TCat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_TCat_inputs():
1717
position=-1,
1818
),
1919
out_file=dict(argstr='-prefix %s',
20-
name_source='in_file',
20+
name_source='in_files',
2121
name_template='%s_tcat',
2222
),
2323
outputtype=dict(),

nipype/interfaces/afni/tests/test_auto_Volreg.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ def test_Volreg_inputs():
3232
name_source='in_file',
3333
name_template='%s.1D',
3434
),
35+
oned_matrix_save=dict(argstr='-1Dmatrix_save %s',
36+
keep_extension=True,
37+
name_source='in_file',
38+
name_template='%s.aff12.1D',
39+
),
3540
out_file=dict(argstr='-prefix %s',
3641
name_source='in_file',
3742
name_template='%s_volreg',
@@ -57,6 +62,7 @@ def test_Volreg_inputs():
5762
def test_Volreg_outputs():
5863
output_map = dict(md1d_file=dict(),
5964
oned_file=dict(),
65+
oned_matrix_save=dict(),
6066
out_file=dict(),
6167
)
6268
outputs = Volreg.output_spec()

0 commit comments

Comments
 (0)