[issue20968] mock.MagicMock does not mock __truediv__
Johannes Baiter
report at bugs.python.org
Tue Mar 18 15:37:23 CET 2014
Johannes Baiter added the comment:
I just noticed that I put the magic method names in the wrong place in the patch.
Attached is a fix that adds 'truediv' to the global 'numberics' variable, this way '__rtruediv__' and '__itruediv__' will be correctly mocked as well.
----------
Added file: http://bugs.python.org/file34491/mock_truediv_numerics.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20968>
_______________________________________
More information about the Python-bugs-list
mailing list