[issue36598] mock side_effect should be checked for iterable not callable
Gregory Ronin added the comment: You are right. I was not calling generator the right way in mock. After I tried your suggestion it works. -- ___ Python tracker <https://bugs.python.org/issue36
[issue36598] mock side_effect should be checked for iterable not callable
New submission from Gregory Ronin : In mock.py, in method: def _mock_call(_mock_self, *args, **kwargs): There is a following piece of code: if not _callable(effect): result = next(effect) if _is_exception(result): raise result if result is DEFAULT