[issue38729] mock.create_autospec generates incorrect signature for some decorated methods

2019-11-08 Thread Ben Reilly
Ben Reilly 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 me

[issue38729] mock.create_autospec generates incorrect signature for some decorated methods

2019-11-07 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: If I understand this correctly, when an autospec of a class is created the attributes themselves of the given class are autospecced. During autospec of attributes it's modelled upon __call__'s signature for the given attributes [0]. Here you are wr

[issue38729] mock.create_autospec generates incorrect signature for some decorated methods

2019-11-06 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- components: +Library (Lib) -Tests nosy: +cjw296, lisroach, mariocj89, michael.foord, xtreak ___ Python tracker ___ _

[issue38729] mock.create_autospec generates incorrect signature for some decorated methods

2019-11-06 Thread Ben Reilly
Change by Ben Reilly : -- components: +Tests ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue38729] mock.create_autospec generates incorrect signature for some decorated methods

2019-11-06 Thread Ben Reilly
New submission from Ben Reilly : mock.create_autospec is meant to create a mock that will ensure, among other things, that method calls on the mock correspond to real methods on the original object and that the arguments match the signature of the original method. However, if the original met