derwiki-adroll / mock

Automatically exported from code.google.com/p/mock
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

[test][patch] Support of staticmethods and classmethods in mocksignature #115

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently mocksignature doesn't work with staticmethods and classmethods. 
Attached patch fixes it.

Original issue reported on code.google.com by gene...@angri.ru on 19 Aug 2011 at 2:43

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for this patch. I'll consider it for inclusion in mock 0.8. I've already 
declared "mock 0.8" as feature complete, so it may have to wait.

In general I'd like to deprecate mocksignature in favour of autospec and 
create_autospec. This already works with staticmethods and classmethods 
(although I'd appreciate you trying it out to check it works for your use 
cases). The reason for preferring autospec is that it doesn't have the downside 
of mocksignature, which mangles named parameters.

Original comment by fuzzyman on 21 Aug 2011 at 1:29

GoogleCodeExporter commented 9 years ago
mocksignature is now removed as it is completely replaced by autospec / 
create_autospec. Please check that this solves your problem. If it doesn't, 
feel free to open a new issue.

Original comment by fuzzyman on 14 Mar 2012 at 6:17