-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Mock spec not respected for attributes prefixed with assert #100739
Labels
type-bug
An unexpected behavior, bug, or error
Comments
cjw296
pushed a commit
that referenced
this issue
Jan 4, 2023
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This was referenced Jan 4, 2023
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jan 4, 2023
…ythonGH-100740) (cherry picked from commit 7f1eefc) Co-authored-by: Christian Klein <167265+cklein@users.noreply.github.com> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jan 4, 2023
…ythonGH-100740) (cherry picked from commit 7f1eefc) Co-authored-by: Christian Klein <167265+cklein@users.noreply.github.com> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
miss-islington
added a commit
that referenced
this issue
Jan 4, 2023
miss-islington
added a commit
that referenced
this issue
Jan 4, 2023
Fixed, and backported to 3.11 and 3.10. Thanks @cklein! |
carljm
added a commit
to carljm/cpython
that referenced
this issue
Jan 5, 2023
* main: pythonGH-100288: Remove LOAD_ATTR_METHOD_WITH_DICT instruction. (pythonGH-100753) pythonGH-100766: Note that locale.LC_MESSAGES is not universal (pythonGH-100702) Drop myself from pathlib maintenance (python#100757) pythongh-100739: Respect mock spec when checking for unsafe prefixes (python#100740)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Example:
An exception is raised:
Python 3.9 and lower:
The error message suggests that accessing attributes with prefix "assert_" should work when using a spec.
See cklein@735ffc4 for a possible fix
Your environment
Linked PRs
The text was updated successfully, but these errors were encountered: