Co-authored-by: Felipe <felipe.nospam.ochoa@gmail.com>
Co-authored-by: Felipe <felipe.nospam.ochoa@gmail.com>
|
@mariocj89 @cjw296 Friendly ping. I have converted the patch from the tracker to PR attributing to original author. It was a frequently requested mock feature and I would be happy to act on review comments for this one. Thanks. |
There was a problem hiding this comment.
Great!, small nitpicks if you want to pick them.
| #Issue23078 | ||
| def test_create_autospec_staticmethod(self): | ||
| class TestClass: | ||
| method = staticmethod(lambda: None) |
There was a problem hiding this comment.
It might be easier to read with the common syntax decorating the method.
There was a problem hiding this comment.
Thanks, changed to decorators 👍
| @@ -0,0 +1,2 @@ | |||
| Add support for staticmethod and classmethod with autospec. Based on patch | |||
| by Felipe. | |||
There was a problem hiding this comment.
You might want to include Felipe's surname. And you can also get credit for this :).
|
Thanks @tirkarthi for the PR, and @berkerpeksag for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
|
Sorry, @tirkarthi and @berkerpeksag, I could not cleanly backport this to |
…ec() (pythonGH-11613) Co-authored-by: Felipe <felipe.nospam.ochoa@gmail.com> (cherry picked from commit 9b21856)
|
GH-12901 is a backport of this pull request to the 3.7 branch. |
Add support for staticmethod and classmethod to mock created with autospec. Patch by @felipeochoa converted into a PR.
Co-authored-by: Felipe felipe.nospam.ochoa@gmail.com
https://bugs.python.org/issue23078