-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attaching a PropertyMock records calls #65454
Comments
What steps will reproduce the problem? >>> foo = Mock(name='foo')
>>> prop = PropertyMock(name='prop')
>>> type(foo).prop = prop
>>> foo.attach_mock(prop, 'prop')
>>> foo.mock_calls
[call.prop(<PropertyMock name='foo.prop' id='4300017296'>)] Expected: >>> foo.mock_calls
[] What version of the product are you using? On what operating system?
Please provide any additional information below.
|
Are both of these lines needed? |
Not sure, but I guess it would be easy to find out. It will need some digging into to find out where the actual bug is. It shouldn't be hard to find though. |
…eMock.__setattr__ (pythonGH-120019) (cherry picked from commit 9e9ee50) Co-authored-by: blhsing <blhsing@gmail.com>
…eMock.__setattr__ (pythonGH-120019) (cherry picked from commit 9e9ee50) Co-authored-by: blhsing <blhsing@gmail.com>
@blhsing Thank you for fixing a 10-year-old issue! 🎉 |
…eMock.__setattr__ (python#120019)
…eMock.__setattr__ (python#120019)
…eMock.__setattr__ (python#120019)
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
The text was updated successfully, but these errors were encountered: