[issue23078] unittest.mock patch autospec doesn't work on staticmethods

Claudiu Popa report at bugs.python.org
Thu Jan 22 10:20:16 CET 2015


Claudiu Popa added the comment:

Here's a patch which does this. One problem could be that staticmethod(some_callable) or classmethod(some_callable) aren't callable per se, but given the fact that users expects Foo.staticmethod or Foo.klassmethod to be callable when patching them, it's something we should consider for fixing.

----------
components: +Library (Lib) -Tests
keywords: +patch
nosy: +Claudiu.Popa
stage:  -> patch review
Added file: http://bugs.python.org/file37818/issue23078.patch

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


More information about the Python-bugs-list mailing list