Skip to content

test_importlib fails when _testcapi is a builtin module #94217

Closed
@tiran

Description

@tiran

Bug report

Some test_importlib cases for extension modules are failing when Python is compiled with dynamic extension support but _testcapi or _testmultiphase are builtin modules:

======================================================================
FAIL: test_module (test.test_importlib.extension.test_finder.Frozen_FinderTests.test_module)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/python-wasm/cpython/Lib/test/test_importlib/extension/test_finder.py", line 25, in test_module
    self.assertTrue(self.find_spec(util.EXTENSIONS.name))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: None is not true

The tests should be skipped if the module name is in sys.builtin_module_names.

Activity

added
type-bugAn unexpected behavior, bug, or error
3.11only security fixes
3.12bugs and security fixes
on Jun 24, 2022
added a commit that references this issue on Jun 24, 2022

pythongh-94217: Skip import tests when _testcapi is a builtin

added 2 commits that reference this issue on Jun 24, 2022

gh-94217: Skip import tests when _testcapi is a builtin (GH-94218)

0a40025

pythongh-94217: Skip import tests when _testcapi is a builtin (python…

added a commit that references this issue on Jun 24, 2022

gh-94217: Skip import tests when _testcapi is a builtin (GH-94218)

89ba660
added a commit that references this issue on Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.11only security fixes3.12bugs and security fixestopic-importlibtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Participants

@brettcannon@tiran@AlexWaygood

Issue actions

    test_importlib fails when _testcapi is a builtin module · Issue #94217 · python/cpython