[issue41954] [mock] Recursion on mocking inspect.isfunction

Lisa Roach report at bugs.python.org
Mon Oct 19 15:15:55 EDT 2020


Lisa Roach <lisaroach14 at gmail.com> added the comment:

Oof yeah, sorry my commit broke this but it is pretty hard to avoid. Mario is right in that it would be messy and challenging to ensure anything mocked from the stdlib doesn't also break mock itself.  

I want to mark this as `wont fix`, unless there is a compelling reason for the stdlib's `inspect.isfunction` to be mockable. But I agree with Mario again here, it would be better to mock the module that is using the function rather than the built-in function itself.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41954>
_______________________________________


More information about the Python-bugs-list mailing list