[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

Anthony Sottile report at bugs.python.org
Wed Apr 6 19:32:02 EDT 2016


Anthony Sottile added the comment:

Here's an improved patch which:

- passes the tests
- puts the test in the correct place

I'm not entirely happy with the approach -- open to suggestions :)

----------
Added file: http://bugs.python.org/file42387/patch2

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


More information about the Python-bugs-list mailing list