[issue18622] reset_mock on mock created by mock_open causes infinite recursion

Michael Foord report at bugs.python.org
Fri Aug 2 10:59:19 CEST 2013


Michael Foord added the comment:

The best way to solve this seems to be to track a set of visited ids (mocks we've reset) and not recurse into mocks we've already done. This is similar to the patch proposed on the google code issue - but not identical as that uses a list and has it as the default argument to reset_mock.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18622>
_______________________________________


More information about the Python-bugs-list mailing list