-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-122864: Fix a test_funcattrs.test___builtins__
when executing directly
#124845
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
Conversation
…le was run directly via: `python -m test.test_funcattrs`.
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
test_funcattrs.test___builtins__
when executing directly
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.
Thanks, LGTM.
Co-authored-by: Victor Stinner <[email protected]>
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
The test works as expected with the fix:
|
Thanks @mbyrnepr2 for the PR, and @Eclips4 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…uting directly (pythonGH-124845) Previously when executing ``test_functattrs.test___builtins__`` directly, it failed because the fact, that ``__builtins__`` is refers to the built-in module ``builtins`` while it's expects a ``__builtins__.__dict__``. But when this test is being run from another module, then ``__builtins__`` is refers to ``builtins.__dict__``. Now this part of the behaviour is covered. --------- (cherry picked from commit 8fbf10d) Co-authored-by: Mark Byrne <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
…uting directly (pythonGH-124845) Previously when executing ``test_functattrs.test___builtins__`` directly, it failed because the fact, that ``__builtins__`` is refers to the built-in module ``builtins`` while it's expects a ``__builtins__.__dict__``. But when this test is being run from another module, then ``__builtins__`` is refers to ``builtins.__dict__``. Now this part of the behaviour is covered. --------- (cherry picked from commit 8fbf10d) Co-authored-by: Mark Byrne <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
GH-124884 is a backport of this pull request to the 3.13 branch. |
GH-124885 is a backport of this pull request to the 3.12 branch. |
…cuting directly (GH-124845) (#124885) gh-122864: Fix a ``test_funcattrs.test___builtins__`` when executing directly (GH-124845) Previously when executing ``test_functattrs.test___builtins__`` directly, it failed because the fact, that ``__builtins__`` is refers to the built-in module ``builtins`` while it's expects a ``__builtins__.__dict__``. But when this test is being run from another module, then ``__builtins__`` is refers to ``builtins.__dict__``. Now this part of the behaviour is covered. --------- (cherry picked from commit 8fbf10d) Co-authored-by: Mark Byrne <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
…cuting directly (GH-124845) (#124884) gh-122864: Fix a ``test_funcattrs.test___builtins__`` when executing directly (GH-124845) Previously when executing ``test_functattrs.test___builtins__`` directly, it failed because the fact, that ``__builtins__`` is refers to the built-in module ``builtins`` while it's expects a ``__builtins__.__dict__``. But when this test is being run from another module, then ``__builtins__`` is refers to ``builtins.__dict__``. Now this part of the behaviour is covered. --------- (cherry picked from commit 8fbf10d) Co-authored-by: Mark Byrne <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
gh-122864: Fix a unit test which was failing when the test module was run directly via:
python -m test.test_funcattrs
.