Yolanda added the comment:
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 7400fb7..9e47cd2 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -991,7 +991,10 @@ class CallableMixin(Base):
raise effect
if not _callable(effect):
- result = next(effect)
+ try:
+ result = next(effect)
+ except StopIteration:
+ result = None
if _is_exception(result):
raise result
if result is DEFAULT:
----------
nosy: +yolanda.robla
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26807>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com