Skip to content

Commit 4eee6b7

Browse files
authored
split bad doctest (it was evaluating only the first value)
1 parent 1fe0df7 commit 4eee6b7

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

nipype/utils/misc.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,23 @@ def str2bool(v):
207207
>>> any([str2bool(v.encode('utf-8'))
208208
... for v in ("no", "false", "n", "f", "0", "off", "Off")])
209209
False
210-
>>> any([str2bool(v) for v in (None, '/some/path', 'Agg', 'INFO',
211-
... '/some/bytes/path'.encode('utf-8'))]) # doctest: +ELLIPSIS
210+
>>> str2bool(None) # doctest: +ELLIPSIS
211+
Traceback (most recent call last):
212+
...
213+
ValueError: ...
214+
>>> str2bool('/some/path') # doctest: +ELLIPSIS
215+
Traceback (most recent call last):
216+
...
217+
ValueError: ...
218+
>>> str2bool('Agg') # doctest: +ELLIPSIS
219+
Traceback (most recent call last):
220+
...
221+
ValueError: ...
222+
>>> str2bool('INFO') # doctest: +ELLIPSIS
223+
Traceback (most recent call last):
224+
...
225+
ValueError: ...
226+
>>> str2bool('/some/bytes/path'.encode('utf-8')) # doctest: +ELLIPSIS
212227
Traceback (most recent call last):
213228
...
214229
ValueError: ...

0 commit comments

Comments
 (0)