Skip to content

Commit 1dd9e7e

Browse files
DylanDylan
authored andcommitted
[FIX] Auto tests
1 parent a8243aa commit 1dd9e7e

13 files changed

+488
-8
lines changed
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 __future__ import unicode_literals
3+
from ..utils import ABoverlap
4+
5+
6+
def test_ABoverlap_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_file_a=dict(argstr='%s',
16+
copyfile=False,
17+
mandatory=True,
18+
position=-3,
19+
),
20+
in_file_b=dict(argstr='%s',
21+
copyfile=False,
22+
mandatory=True,
23+
position=-2,
24+
),
25+
no_automask=dict(argstr='-no_automask',
26+
),
27+
out_file=dict(argstr=' |& tee %s',
28+
position=-1,
29+
),
30+
outputtype=dict(),
31+
quiet=dict(argstr='-quiet',
32+
),
33+
terminal_output=dict(nohash=True,
34+
),
35+
verb=dict(argstr='-verb',
36+
),
37+
)
38+
inputs = ABoverlap.input_spec()
39+
40+
for key, metadata in list(input_map.items()):
41+
for metakey, value in list(metadata.items()):
42+
assert getattr(inputs.traits()[key], metakey) == value
43+
44+
45+
def test_ABoverlap_outputs():
46+
output_map = dict(out_file=dict(),
47+
)
48+
outputs = ABoverlap.output_spec()
49+
50+
for key, metadata in list(output_map.items()):
51+
for metakey, value in list(metadata.items()):
52+
assert getattr(outputs.traits()[key], metakey) == value
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..base import AFNIPythonCommand
4+
5+
6+
def test_AFNIPythonCommand_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+
out_file=dict(argstr='-prefix %s',
16+
name_source=['in_file'],
17+
name_template='%s_afni',
18+
),
19+
outputtype=dict(),
20+
terminal_output=dict(nohash=True,
21+
),
22+
)
23+
inputs = AFNIPythonCommand.input_spec()
24+
25+
for key, metadata in list(input_map.items()):
26+
for metakey, value in list(metadata.items()):
27+
assert getattr(inputs.traits()[key], metakey) == value
28+
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..preprocess import AlignEpiAnatPy
4+
5+
6+
def test_AlignEpiAnatPy_inputs():
7+
input_map = dict(anat=dict(argstr='-anat %s',
8+
copyfile=False,
9+
mandatory=True,
10+
),
11+
anat2epi=dict(argstr='-anat2epi',
12+
),
13+
args=dict(argstr='%s',
14+
),
15+
environ=dict(nohash=True,
16+
usedefault=True,
17+
),
18+
epi2anat=dict(argstr='-epi2anat',
19+
),
20+
epi_base=dict(argstr='-epi_base %s',
21+
mandatory=True,
22+
),
23+
epi_strip=dict(argstr='-epi_strip %s',
24+
),
25+
ignore_exception=dict(nohash=True,
26+
usedefault=True,
27+
),
28+
in_file=dict(argstr='-epi %s',
29+
copyfile=False,
30+
mandatory=True,
31+
),
32+
outputtype=dict(),
33+
py27_path=dict(usedefault=True,
34+
),
35+
save_skullstrip=dict(argstr='-save_skullstrip',
36+
),
37+
suffix=dict(argstr='-suffix %s',
38+
usedefault=True,
39+
),
40+
terminal_output=dict(nohash=True,
41+
),
42+
tshift=dict(argstr='-tshift %s',
43+
usedefault=True,
44+
),
45+
volreg=dict(argstr='-volreg %s',
46+
usedefault=True,
47+
),
48+
)
49+
inputs = AlignEpiAnatPy.input_spec()
50+
51+
for key, metadata in list(input_map.items()):
52+
for metakey, value in list(metadata.items()):
53+
assert getattr(inputs.traits()[key], metakey) == value
54+
55+
56+
def test_AlignEpiAnatPy_outputs():
57+
output_map = dict(anat_al_mat=dict(),
58+
anat_al_orig=dict(),
59+
epi_al_mat=dict(),
60+
epi_al_orig=dict(),
61+
epi_al_tlrc_mat=dict(),
62+
epi_reg_al_mat=dict(),
63+
epi_tlrc_al=dict(),
64+
epi_vr_al_mat=dict(),
65+
epi_vr_motion=dict(),
66+
skullstrip=dict(),
67+
)
68+
outputs = AlignEpiAnatPy.output_spec()
69+
70+
for key, metadata in list(output_map.items()):
71+
for metakey, value in list(metadata.items()):
72+
assert getattr(outputs.traits()[key], metakey) == value

nipype/interfaces/afni/tests/test_auto_Allineate.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55

66
def test_Allineate_inputs():
7-
input_map = dict(args=dict(argstr='%s',
7+
input_map = dict(allcostx=dict(argstr='-allcostx |& tee %s',
8+
position=-1,
9+
xor=['out_file'],
10+
),
11+
args=dict(argstr='%s',
812
),
913
autobox=dict(argstr='-autobox',
1014
),
@@ -35,10 +39,8 @@ def test_Allineate_inputs():
3539
in_file=dict(argstr='-source %s',
3640
copyfile=False,
3741
mandatory=True,
38-
position=-1,
3942
),
4043
in_matrix=dict(argstr='-1Dmatrix_apply %s',
41-
position=-3,
4244
),
4345
in_param_file=dict(argstr='-1Dparam_apply %s',
4446
),
@@ -64,8 +66,9 @@ def test_Allineate_inputs():
6466
),
6567
out_file=dict(argstr='-prefix %s',
6668
genfile=True,
67-
name_source='%s_allineate',
68-
position=-2,
69+
name_source='in_file',
70+
name_template='%s_allineate',
71+
xor=['allcostx'],
6972
),
7073
out_matrix=dict(argstr='-1Dmatrix_save %s',
7174
),
@@ -113,7 +116,8 @@ def test_Allineate_inputs():
113116

114117

115118
def test_Allineate_outputs():
116-
output_map = dict(matrix=dict(),
119+
output_map = dict(allcostx=dict(),
120+
matrix=dict(),
117121
out_file=dict(),
118122
)
119123
outputs = Allineate.output_spec()
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..preprocess import AutoTLRC
4+
5+
6+
def test_AutoTLRC_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
base=dict(argstr='-base %s',
10+
mandatory=True,
11+
),
12+
environ=dict(nohash=True,
13+
usedefault=True,
14+
),
15+
ignore_exception=dict(nohash=True,
16+
usedefault=True,
17+
),
18+
in_file=dict(argstr='-input %s',
19+
copyfile=False,
20+
mandatory=True,
21+
),
22+
no_ss=dict(argstr='-no_ss',
23+
),
24+
outputtype=dict(),
25+
terminal_output=dict(nohash=True,
26+
),
27+
)
28+
inputs = AutoTLRC.input_spec()
29+
30+
for key, metadata in list(input_map.items()):
31+
for metakey, value in list(metadata.items()):
32+
assert getattr(inputs.traits()[key], metakey) == value
33+
34+
35+
def test_AutoTLRC_outputs():
36+
output_map = dict(out_file=dict(),
37+
)
38+
outputs = AutoTLRC.output_spec()
39+
40+
for key, metadata in list(output_map.items()):
41+
for metakey, value in list(metadata.items()):
42+
assert getattr(outputs.traits()[key], metakey) == value
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..utils import Bucket
4+
5+
6+
def test_Bucket_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_file=dict(argstr='%s',
16+
mandatory=True,
17+
position=-1,
18+
),
19+
out_file=dict(argstr='-prefix %s',
20+
name_template='buck',
21+
),
22+
outputtype=dict(),
23+
terminal_output=dict(nohash=True,
24+
),
25+
)
26+
inputs = Bucket.input_spec()
27+
28+
for key, metadata in list(input_map.items()):
29+
for metakey, value in list(metadata.items()):
30+
assert getattr(inputs.traits()[key], metakey) == value
31+
32+
33+
def test_Bucket_outputs():
34+
output_map = dict(out_file=dict(),
35+
)
36+
outputs = Bucket.output_spec()
37+
38+
for key, metadata in list(output_map.items()):
39+
for metakey, value in list(metadata.items()):
40+
assert getattr(outputs.traits()[key], metakey) == value

nipype/interfaces/afni/tests/test_auto_Calc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def test_Calc_inputs():
3333
name_template='%s_calc',
3434
),
3535
outputtype=dict(),
36+
overwrite=dict(argstr='-overwrite',
37+
),
3638
single_idx=dict(),
3739
start_idx=dict(requires=['stop_idx'],
3840
),
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 CatMatvec
4+
5+
6+
def test_CatMatvec_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
environ=dict(nohash=True,
10+
usedefault=True,
11+
),
12+
fourxfour=dict(argstr='-4x4',
13+
descr='Output matrix in augmented form (last row is 0 0 0 1)This option does not work with -MATRIX or -ONELINE',
14+
xor=['matrix', 'oneline'],
15+
),
16+
ignore_exception=dict(nohash=True,
17+
usedefault=True,
18+
),
19+
in_file=dict(argstr='%s',
20+
descr='list of tuples of mfiles and associated opkeys',
21+
mandatory=True,
22+
position=-2,
23+
),
24+
matrix=dict(argstr='-MATRIX',
25+
descr="indicates that the resulting matrix willbe written to outfile in the 'MATRIX(...)' format (FORM 3).This feature could be used, with clever scripting, to inputa matrix directly on the command line to program 3dWarp.",
26+
xor=['oneline', 'fourXfour'],
27+
),
28+
oneline=dict(argstr='-ONELINE',
29+
descr='indicates that the resulting matrixwill simply be written as 12 numbers on one line.',
30+
xor=['matrix', 'fourXfour'],
31+
),
32+
out_file=dict(argstr=' > %s',
33+
descr='File to write concattenated matvecs to',
34+
mandatory=True,
35+
position=-1,
36+
),
37+
outputtype=dict(),
38+
terminal_output=dict(nohash=True,
39+
),
40+
)
41+
inputs = CatMatvec.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_CatMatvec_outputs():
49+
output_map = dict(out_file=dict(),
50+
)
51+
outputs = CatMatvec.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)