Author xtreak
Recipients breilly_box, cjw296, lisroach, mariocj89, michael.foord, xtreak
Date 2019-11-08.06:30:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1573194647.6.0.197747408334.issue38729@roundup.psfhosted.org>
In-reply-to
Content
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 wrapping the method's inside a class with Wrapper with a custom __call__ implementation. During actual calls the chain goes through __call__ and executes __get__ where bound method is called. But in mock I am not sure of a way where it can figure out __call__ and then look more into the body to see if there are actual calls being made to be mocked with current implementation just going through signature of __call__.

[0] https://github.com/python/cpython/blob/befa032d8869e0fab4732d910f3887642879d644/Lib/unittest/mock.py#L94
History
Date User Action Args
2019-11-08 06:30:47xtreaksetrecipients: + xtreak, cjw296, michael.foord, lisroach, mariocj89, breilly_box
2019-11-08 06:30:47xtreaksetmessageid: <1573194647.6.0.197747408334.issue38729@roundup.psfhosted.org>
2019-11-08 06:30:47xtreaklinkissue38729 messages
2019-11-08 06:30:47xtreakcreate