Skip to content

Commit feb9a49

Browse files
authored
GH-103247: bypass the import cache on the _require_loader helper
1 parent edb569e commit feb9a49

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_import/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import _testinternalcapi
2626
import _imp
2727

28+
from test.support import import_helper
2829
from test.support import os_helper
2930
from test.support import (
3031
STDLIB_DIR, swap_attr, swap_item, cpython_only, is_emscripten,
@@ -58,7 +59,7 @@
5859

5960
def _require_loader(module, loader, skip):
6061
if isinstance(module, str):
61-
module = __import__(module)
62+
module = import_helper.import_fresh_module(module)
6263

6364
MODULE_KINDS = {
6465
BuiltinImporter: 'built-in',

0 commit comments

Comments
 (0)