Skip to content

Commit 1916a60

Browse files
committed
FIX: iterable checks longest
1 parent 58ff06a commit 1916a60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scipy_doctest/impl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import warnings
33
import doctest
44
from doctest import NORMALIZE_WHITESPACE, ELLIPSIS, IGNORE_EXCEPTION_DETAIL
5+
from itertools import zip_longest
56

67
import numpy as np
78

@@ -328,7 +329,7 @@ def check_output(self, want, got, optionflags):
328329
except Exception:
329330
# heterog tuple, eg (1, np.array([1., 2.]))
330331
try:
331-
return all(self._do_check(w, g) for w, g in zip(a_want, a_got))
332+
return all(self._do_check(w, g) for w, g in zip_longest(a_want, a_got))
332333
except (TypeError, ValueError):
333334
return False
334335

0 commit comments

Comments
 (0)