mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-40275: Use new test.support helper submodules in tests (GH-21314)
This commit is contained in:
parent
9ce8132e1f
commit
883bc63833
19 changed files with 225 additions and 194 deletions
|
@ -12,6 +12,7 @@ import os
|
|||
import os.path
|
||||
from pathlib import Path, PurePath
|
||||
from test import support
|
||||
from test.support import import_helper
|
||||
import unittest
|
||||
import sys
|
||||
import tempfile
|
||||
|
@ -55,8 +56,8 @@ _extension_details()
|
|||
def import_importlib(module_name):
|
||||
"""Import a module from importlib both w/ and w/o _frozen_importlib."""
|
||||
fresh = ('importlib',) if '.' in module_name else ()
|
||||
frozen = support.import_fresh_module(module_name)
|
||||
source = support.import_fresh_module(module_name, fresh=fresh,
|
||||
frozen = import_helper.import_fresh_module(module_name)
|
||||
source = import_helper.import_fresh_module(module_name, fresh=fresh,
|
||||
blocked=('_frozen_importlib', '_frozen_importlib_external'))
|
||||
return {'Frozen': frozen, 'Source': source}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue