Skip to content

Commit ee19e50

Browse files
committed
fixed pre-existing tests
1 parent 595ec12 commit ee19e50

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

nipype/interfaces/fsl/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def _create_ev_files(
218218
for j in range(0, num_evs[0] + 1):
219219
try:
220220
orthogonal = int(orthogonalization[i][j])
221-
except (ValueError, TypeError):
221+
except (KeyError, TypeError, ValueError):
222222
orthogonal = 0
223223
ev_txt += ev_ortho.substitute(c0=i, c1=j, orthogonal=orthogonal)
224224
ev_txt += "\n"

nipype/interfaces/fsl/tests/test_Level1Design_functions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ def test_level1design():
1212
contrasts = Undefined
1313
usetd = False
1414
do_tempfilter = False
15+
orthogonalization = {}
16+
ev_parameters = {"temporalderiv":False}
1517
for key, val in [('hrf', 3), ('dgamma', 3), ('gamma', 2), ('none', 0)]:
1618
output_num, output_txt = Level1Design._create_ev_files(l, os.getcwd(),
1719
runinfo, runidx,
18-
usetd, contrasts,
20+
ev_parameters,
21+
orthogonalization,
22+
contrasts,
1923
do_tempfilter,
2024
key)
2125
assert "set fmri(convolve1) {0}".format(val) in output_txt

0 commit comments

Comments
 (0)