Uh oh!
There was an error while loading. Please reload this page.
gh-124176: Add special support for dataclasses to create_autospec - #124429
Conversation
ericvsmith
left a comment
There was a problem hiding this comment.
I'm not a user of unittest.mock, but these changes look reasonable to me.
carljm
left a comment
There was a problem hiding this comment.
This looks reasonable to me as well.
Uh oh!
There was an error while loading. Please reload this page.
cjw296
left a comment
There was a problem hiding this comment.
Supportive of the change, just the code hygiene changes to make.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When you're done making the requested changes, leave the comment: |
sobolevn
commented
Sep 26, 2024
@cjw296 done! 👍 |
Uh oh!
There was an error while loading. Please reload this page.
sobolevn
commented
Sep 27, 2024
Thanks everyone! 🎉 |
Now creating autospecs from dataclass types is easier. We inspect all fields and add them to
__dir__, so mock's spec will know about future dataclass instance fields.