Skip to content
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

test_importlib incorrectly relies on <module>.__builtins__ #65698

Closed
ericsnowcurrently opened this issue May 13, 2014 · 2 comments
Closed

test_importlib incorrectly relies on <module>.__builtins__ #65698

ericsnowcurrently opened this issue May 13, 2014 · 2 comments
Assignees
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@ericsnowcurrently
Copy link
Member

BPO 21499
Nosy @brettcannon, @ericsnowcurrently

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:

assignee = 'https://github.com/ericsnowcurrently'
closed_at = <Date 2014-05-13.18:20:25.217>
created_at = <Date 2014-05-13.18:13:54.016>
labels = ['type-bug', 'tests']
title = 'test_importlib incorrectly relies on <module>.__builtins__'
updated_at = <Date 2014-05-13.18:20:25.216>
user = 'https://github.com/ericsnowcurrently'

bugs.python.org fields:

activity = <Date 2014-05-13.18:20:25.216>
actor = 'eric.snow'
assignee = 'eric.snow'
closed = True
closed_date = <Date 2014-05-13.18:20:25.217>
closer = 'eric.snow'
components = ['Tests']
creation = <Date 2014-05-13.18:13:54.016>
creator = 'eric.snow'
dependencies = []
files = []
hgrepos = []
issue_num = 21499
keywords = []
message_count = 2.0
messages = ['218474', '218475']
nosy_count = 3.0
nosy_names = ['brett.cannon', 'python-dev', 'eric.snow']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue21499'
versions = ['Python 3.4', 'Python 3.5']

@ericsnowcurrently
Copy link
Member Author

Per the docs*, a module's __builtins__ may be a module or a dict or even missing. However, test.test_importlib.test_api.ReloadTests checks __builtins__ as part of several tests. Instead, the tests should ignore __bulitins__. I'll push a patch in a minute that fixes that.

@ericsnowcurrently ericsnowcurrently self-assigned this May 13, 2014
@ericsnowcurrently ericsnowcurrently added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels May 13, 2014
@python-dev
Copy link
Mannequin

python-dev mannequin commented May 13, 2014

New changeset 16d26391ec36 by Eric Snow in branch '3.4':
Issue bpo-21499: Ignore __builtins__ in several test_importlib.test_api tests.
http://hg.python.org/cpython/rev/16d26391ec36

New changeset bdf94b2c0639 by Eric Snow in branch 'default':
Merge from 3.4 (for bpo-21499).
http://hg.python.org/cpython/rev/bdf94b2c0639

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant