Skip to content

test_importlib incorrectly relies on <module>.__builtins__ #65698

Closed

Description

@ericsnowcurrently
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']

Activity

  1. ericsnowcurrently commented on May 13, 2014

    @ericsnowcurrently
    MemberAuthor

    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.

  2. python-dev commented on May 13, 2014

    python-devmannequin
    Mannequin

    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

  3. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions