mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
GH-103247: bypass the import cache on the _require_loader helper
This commit is contained in:
parent
edb569e8e1
commit
feb9a49c9c
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@ from unittest import mock
|
|||
import _testinternalcapi
|
||||
import _imp
|
||||
|
||||
from test.support import import_helper
|
||||
from test.support import os_helper
|
||||
from test.support import (
|
||||
STDLIB_DIR, swap_attr, swap_item, cpython_only, is_emscripten,
|
||||
|
@ -58,7 +59,7 @@ skip_if_dont_write_bytecode = unittest.skipIf(
|
|||
|
||||
def _require_loader(module, loader, skip):
|
||||
if isinstance(module, str):
|
||||
module = __import__(module)
|
||||
module = import_helper.import_fresh_module(module)
|
||||
|
||||
MODULE_KINDS = {
|
||||
BuiltinImporter: 'built-in',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue