Skip to content

Commit 814349e

Browse files
committed
add auto tests
1 parent 55e3f89 commit 814349e

File tree

2 files changed

+144
-0
lines changed

2 files changed

+144
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from nipype.testing import assert_equal
3+
from nipype.interfaces.mrtrix3.preprocess import ResponseSD
4+
5+
def test_ResponseSD_inputs():
6+
input_map = dict(args=dict(argstr='%s',
7+
),
8+
bval_scale=dict(argstr='-bvalue_scaling %s',
9+
),
10+
disp_mult=dict(argstr='-dispersion_multiplier %f',
11+
),
12+
environ=dict(nohash=True,
13+
usedefault=True,
14+
),
15+
grad_file=dict(argstr='-grad %s',
16+
),
17+
grad_fsl=dict(argstr='-fslgrad %s %s',
18+
),
19+
ignore_exception=dict(nohash=True,
20+
usedefault=True,
21+
),
22+
in_file=dict(argstr='%s',
23+
mandatory=True,
24+
position=-2,
25+
),
26+
in_mask=dict(argstr='-mask %s',
27+
),
28+
int_mult=dict(argstr='-integral_multiplier %f',
29+
),
30+
iterations=dict(argstr='-max_iters %d',
31+
),
32+
max_change=dict(argstr='-max_change %f',
33+
),
34+
max_sh=dict(argstr='-lmax %d',
35+
),
36+
out_file=dict(argstr='%s',
37+
mandatory=True,
38+
position=-1,
39+
usedefault=True,
40+
),
41+
out_sf=dict(argstr='-sf %s',
42+
),
43+
shell=dict(argstr='-shell %f',
44+
sep=',',
45+
),
46+
terminal_output=dict(nohash=True,
47+
),
48+
test_all=dict(argstr='-test_all',
49+
),
50+
vol_ratio=dict(argstr='-volume_ratio %f',
51+
),
52+
)
53+
inputs = ResponseSD.input_spec()
54+
55+
for key, metadata in input_map.items():
56+
for metakey, value in metadata.items():
57+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
58+
59+
def test_ResponseSD_outputs():
60+
output_map = dict(out_file=dict(),
61+
out_sf=dict(),
62+
)
63+
outputs = ResponseSD.output_spec()
64+
65+
for key, metadata in output_map.items():
66+
for metakey, value in metadata.items():
67+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
68+
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 nipype.testing import assert_equal
3+
from nipype.interfaces.mrtrix3.tracking import Tractography
4+
5+
def test_Tractography_inputs():
6+
input_map = dict(act_file=dict(argstr='-act %s',
7+
),
8+
algorithm=dict(argstr='-algorithm %s',
9+
usedefault=True,
10+
),
11+
args=dict(argstr='%s',
12+
),
13+
backtrack=dict(argstr='-backtrack',
14+
),
15+
bval_scale=dict(argstr='-bvalue_scaling %s',
16+
),
17+
crop_at_gmwmi=dict(argstr='-crop_at_gmwmi',
18+
),
19+
environ=dict(nohash=True,
20+
usedefault=True,
21+
),
22+
grad_file=dict(argstr='-grad %s',
23+
),
24+
grad_fsl=dict(argstr='-fslgrad %s %s',
25+
),
26+
ignore_exception=dict(nohash=True,
27+
usedefault=True,
28+
),
29+
in_file=dict(argstr='%s',
30+
mandatory=True,
31+
position=-2,
32+
),
33+
out_file=dict(argstr='%s',
34+
mandatory=True,
35+
position=-1,
36+
usedefault=True,
37+
),
38+
out_seeds=dict(argstr='-output_seeds %s',
39+
),
40+
roi_excl=dict(argstr='-exclude %s',
41+
),
42+
roi_incl=dict(argstr='-include %s',
43+
),
44+
roi_mask=dict(argstr='-mask %s',
45+
),
46+
seed_grid_voxel=dict(argstr='-seed_grid_per_voxel %s %d',
47+
xor=['seed_image', 'seed_rnd_voxel'],
48+
),
49+
seed_image=dict(argstr='-seed_image %s',
50+
),
51+
seed_rnd_voxel=dict(argstr='-seed_random_per_voxel %s %d',
52+
xor=['seed_image', 'seed_grid_voxel'],
53+
),
54+
seed_sphere=dict(argstr='-seed_sphere %f,%f,%f,%f',
55+
),
56+
sph_trait=dict(argstr='%f,%f,%f,%f',
57+
),
58+
terminal_output=dict(nohash=True,
59+
),
60+
)
61+
inputs = Tractography.input_spec()
62+
63+
for key, metadata in input_map.items():
64+
for metakey, value in metadata.items():
65+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
66+
67+
def test_Tractography_outputs():
68+
output_map = dict(out_file=dict(),
69+
out_seeds=dict(),
70+
)
71+
outputs = Tractography.output_spec()
72+
73+
for key, metadata in output_map.items():
74+
for metakey, value in metadata.items():
75+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
76+

0 commit comments

Comments
 (0)