Skip to content

Commit b7fec7b

Browse files
committed
fixed pre-existing tests
1 parent b8efe40 commit b7fec7b

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
@@ -13,10 +13,14 @@ def test_level1design():
1313
contrasts = Undefined
1414
usetd = False
1515
do_tempfilter = False
16+
orthogonalization = {}
17+
ev_parameters = {"temporalderiv":False}
1618
for key, val in [('hrf', 3), ('dgamma', 3), ('gamma', 2), ('none', 0)]:
1719
output_num, output_txt = Level1Design._create_ev_files(l, os.getcwd(),
1820
runinfo, runidx,
19-
usetd, contrasts,
21+
ev_parameters,
22+
orthogonalization,
23+
contrasts,
2024
do_tempfilter,
2125
key)
2226
yield assert_true, "set fmri(convolve1) {0}".format(val) in output_txt

0 commit comments

Comments
 (0)