Skip to content

Commit 059f3ee

Browse files
committed
add autogenerated tests
1 parent 6512e7a commit 059f3ee

File tree

3 files changed

+154
-2
lines changed

3 files changed

+154
-2
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..preprocess import DWIBiasCorrect
4+
5+
6+
def test_DWIBiasCorrect_inputs():
7+
input_map = dict(
8+
args=dict(argstr='%s', ),
9+
bval_scale=dict(argstr='-bvalue_scaling %s', ),
10+
environ=dict(
11+
nohash=True,
12+
usedefault=True,
13+
),
14+
fsl_grad=dict(
15+
argstr='-fslgrad %s %s',
16+
xor=('mrtrix_grad', 'fsl_grad'),
17+
),
18+
grad_file=dict(argstr='-grad %s', ),
19+
grad_fsl=dict(argstr='-fslgrad %s %s', ),
20+
in_bval=dict(),
21+
in_bvec=dict(argstr='-fslgrad %s %s', ),
22+
in_file=dict(
23+
argstr='%s',
24+
mandatory=True,
25+
position=-2,
26+
),
27+
in_mask=dict(argstr='-mask %s', ),
28+
mrtrix_grad=dict(
29+
argstr='-grad %s',
30+
xor=('mrtrix_grad', 'fsl_grad'),
31+
),
32+
nthreads=dict(
33+
argstr='-nthreads %d',
34+
nohash=True,
35+
),
36+
out_bias=dict(
37+
argstr='-bias %s',
38+
genfile=True,
39+
keep_extension=True,
40+
name_source='in_file',
41+
name_template='%s_biasfield',
42+
),
43+
out_file=dict(
44+
argstr='%s',
45+
genfile=True,
46+
keep_extension=True,
47+
name_source='in_file',
48+
name_template='%s_biascorr',
49+
position=-1,
50+
),
51+
use_ants=dict(
52+
argstr='-ants',
53+
usedefault=True,
54+
xor=('use_ants', 'use_fsl'),
55+
),
56+
use_fsl=dict(
57+
argstr='-fsl',
58+
min_ver='5.0.10',
59+
xor=('use_ants', 'use_fsl'),
60+
),
61+
)
62+
inputs = DWIBiasCorrect.input_spec()
63+
64+
for key, metadata in list(input_map.items()):
65+
for metakey, value in list(metadata.items()):
66+
assert getattr(inputs.traits()[key], metakey) == value
67+
def test_DWIBiasCorrect_outputs():
68+
output_map = dict(
69+
out_bias=dict(),
70+
out_file=dict(),
71+
)
72+
outputs = DWIBiasCorrect.output_spec()
73+
74+
for key, metadata in list(output_map.items()):
75+
for metakey, value in list(metadata.items()):
76+
assert getattr(outputs.traits()[key], metakey) == value

nipype/interfaces/mrtrix3/tests/test_auto_DWIDenoise.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,36 @@ def test_DWIDenoise_inputs():
2525
argstr='-mask %s',
2626
position=1,
2727
),
28-
noise=dict(argstr='-noise %s', ),
2928
nthreads=dict(
3029
argstr='-nthreads %d',
3130
nohash=True,
3231
),
3332
out_file=dict(
3433
argstr='%s',
34+
genfile=True,
3535
keep_extension=True,
3636
name_source='in_file',
3737
name_template='%s_denoised',
3838
position=-1,
3939
),
40+
out_noisemap=dict(
41+
argstr='-noise %s',
42+
genfile=True,
43+
keep_extension=True,
44+
name_source='in_file',
45+
name_template='%s_noisemap',
46+
),
4047
)
4148
inputs = DWIDenoise.input_spec()
4249

4350
for key, metadata in list(input_map.items()):
4451
for metakey, value in list(metadata.items()):
4552
assert getattr(inputs.traits()[key], metakey) == value
4653
def test_DWIDenoise_outputs():
47-
output_map = dict(out_file=dict(), )
54+
output_map = dict(
55+
out_file=dict(),
56+
out_noisemap=dict(),
57+
)
4858
outputs = DWIDenoise.output_spec()
4959

5060
for key, metadata in list(output_map.items()):
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 ..preprocess import MRDeGibbs
4+
5+
6+
def test_MRDeGibbs_inputs():
7+
input_map = dict(
8+
args=dict(argstr='%s', ),
9+
axes=dict(
10+
argstr='-axes %s',
11+
maxlen=2,
12+
minlen=2,
13+
sep=',',
14+
usedefault=True,
15+
),
16+
bval_scale=dict(argstr='-bvalue_scaling %s', ),
17+
environ=dict(
18+
nohash=True,
19+
usedefault=True,
20+
),
21+
grad_file=dict(argstr='-grad %s', ),
22+
grad_fsl=dict(argstr='-fslgrad %s %s', ),
23+
in_bval=dict(),
24+
in_bvec=dict(argstr='-fslgrad %s %s', ),
25+
in_file=dict(
26+
argstr='%s',
27+
mandatory=True,
28+
position=-2,
29+
),
30+
maxW=dict(
31+
argstr='-maxW %d',
32+
usedefault=True,
33+
),
34+
minW=dict(
35+
argstr='-minW %d',
36+
usedefault=True,
37+
),
38+
nshifts=dict(
39+
argstr='-nshifts %d',
40+
usedefault=True,
41+
),
42+
nthreads=dict(
43+
argstr='-nthreads %d',
44+
nohash=True,
45+
),
46+
out_file=dict(
47+
argstr='%s',
48+
genfile=True,
49+
keep_extension=True,
50+
name_source='in_file',
51+
name_template='%s_unr',
52+
position=-1,
53+
),
54+
)
55+
inputs = MRDeGibbs.input_spec()
56+
57+
for key, metadata in list(input_map.items()):
58+
for metakey, value in list(metadata.items()):
59+
assert getattr(inputs.traits()[key], metakey) == value
60+
def test_MRDeGibbs_outputs():
61+
output_map = dict(out_file=dict(), )
62+
outputs = MRDeGibbs.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

0 commit comments

Comments
 (0)