-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
3.12.0a7 changes behavior of PropertyMock #103329
Comments
@sunmy2019 I'm not sure aa0a73d is the cause here (or, at least, it isn't the only thing in play); in my testing, that commit still raises a ValueError - although the presentation is slightly different, as it also includes
whereas 3.11 et al raise:
|
Looks like it was fixed by #103332 With current main, I got the same output as in your python3.11. @freakboy3742 |
Before closing this issue, we should add a test for this case that would have failed on the original breaking PR. |
pythonGH-103358) (cherry picked from commit 26c6598) Co-authored-by: Russell Keith-Magee <[email protected]>
…103358) (cherry picked from commit 26c6598) Co-authored-by: Russell Keith-Magee <[email protected]>
Bug report
3.12.0a7 changed the behavior of
unittest.mock.PropertyMock
Setup:
In Python 3.12.0a6 and earlier,
m.foo
evaluates as 3, andm.bar
raises a ValueError.In Python 3.12.0a7,
m.foo
evaluates as 3, andm.bar
returns<MagicMock name='mock.bar' id=...>
Your environment
Linked PRs
The text was updated successfully, but these errors were encountered: