This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author breilly_box
Recipients breilly_box, cjw296, lisroach, mariocj89, michael.foord, xtreak
Date 2019-11-08.17:57:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1573235829.51.0.495027364083.issue38729@roundup.psfhosted.org>
In-reply-to
Content
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`?
History
Date User Action Args
2019-11-08 17:57:09breilly_boxsetrecipients: + breilly_box, cjw296, michael.foord, lisroach, mariocj89, xtreak
2019-11-08 17:57:09breilly_boxsetmessageid: <1573235829.51.0.495027364083.issue38729@roundup.psfhosted.org>
2019-11-08 17:57:09breilly_boxlinkissue38729 messages
2019-11-08 17:57:09breilly_boxcreate