Ben Reilly <brei...@box.com> added the comment:
Yes, your description sounds right, and I had zero-ed in on the same park of the mock code when I was doing my investigation. I know that this is a peculiar situation, but one thing to note is that `inspect.signature` gets the signature right on these wrapped methods. You can see this if you were to add in an appropriate spot the following code to the script: ==== from inspect import signature print(signature(a.with_arg)) # prints `(x)` print(signature(a.no_arg)) # prints `()` ==== Is there a reason why mock calculates the signature on its own rather than relying on `inspect`? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38729> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com