Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-65454: avoid triggering call to a PropertyMock in NonCallableMock.__setattr__#120019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM. Do you consider this a bugfix or a feature improvement?
Thanks. I believe this is a bug (it was filed as one) since it should be expected that a |
…eMock.__setattr__ (pythonGH-120019)(cherry picked from commit9e9ee50)Co-authored-by: blhsing <blhsing@gmail.com>
…eMock.__setattr__ (pythonGH-120019)(cherry picked from commit9e9ee50)Co-authored-by: blhsing <blhsing@gmail.com>
GH-120336 is a backport of this pull request to the3.13 branch. |
GH-120337 is a backport of this pull request to the3.12 branch. |
Uh oh!
There was an error while loading.Please reload this page.
Avoid triggering call to a
PropertyMockinNonCallableMock.__setattr__Previously attaching a
PropertyMockto a mock object would trigger a call to the property mock due to a recursive__setattr__call.This is now fixed by setting the given property mock as an attribute of the hosting mock directly in its
__dict__instead.