Felipe added the comment:

Regarding Claudiu's comment about `staticmethod(x)` or `classmethod(x)` not 
being callable, would it suffice to add a specific check of the form 
`(isinstance(x, (classmethod, staticmethod)) and _callable(x.__func__))`?

Separately, would it be better to include the check for `staticmethod` and 
`classmethod` objects (with an underlying callable) inside the `_callable` 
function? Not sure if this would break anything, but it seems like conceptually 
the issue is with the definition of a callable object, not the selection of 
mock type to use.

----------
nosy: +fov

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23078>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to