mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #23911: Move path-based bootstrap code to a separate frozen module.
This commit is contained in:
parent
6b4c63dea5
commit
32439d6eb6
27 changed files with 6192 additions and 5712 deletions
|
@ -1,4 +1,4 @@
|
|||
from importlib import _bootstrap
|
||||
from importlib import _bootstrap_external
|
||||
import sys
|
||||
from test import support
|
||||
import unittest
|
||||
|
@ -26,7 +26,7 @@ class ExtensionModuleCaseSensitivityTest:
|
|||
def test_case_sensitive(self):
|
||||
with support.EnvironmentVarGuard() as env:
|
||||
env.unset('PYTHONCASEOK')
|
||||
if b'PYTHONCASEOK' in _bootstrap._os.environ:
|
||||
if b'PYTHONCASEOK' in _bootstrap_external._os.environ:
|
||||
self.skipTest('os.environ changes not reflected in '
|
||||
'_os.environ')
|
||||
loader = self.find_module()
|
||||
|
@ -35,7 +35,7 @@ class ExtensionModuleCaseSensitivityTest:
|
|||
def test_case_insensitivity(self):
|
||||
with support.EnvironmentVarGuard() as env:
|
||||
env.set('PYTHONCASEOK', '1')
|
||||
if b'PYTHONCASEOK' not in _bootstrap._os.environ:
|
||||
if b'PYTHONCASEOK' not in _bootstrap_external._os.environ:
|
||||
self.skipTest('os.environ changes not reflected in '
|
||||
'_os.environ')
|
||||
loader = self.find_module()
|
||||
|
|
|
@ -99,7 +99,7 @@ class FinderTests:
|
|||
new_path_importer_cache.pop(None, None)
|
||||
new_path_hooks = [zipimport.zipimporter,
|
||||
self.machinery.FileFinder.path_hook(
|
||||
*self.importlib._bootstrap._get_supported_file_loaders())]
|
||||
*self.importlib._bootstrap_external._get_supported_file_loaders())]
|
||||
missing = object()
|
||||
email = sys.modules.pop('email', missing)
|
||||
try:
|
||||
|
|
|
@ -42,7 +42,7 @@ class CaseSensitivityTest:
|
|||
def test_sensitive(self):
|
||||
with test_support.EnvironmentVarGuard() as env:
|
||||
env.unset('PYTHONCASEOK')
|
||||
if b'PYTHONCASEOK' in self.importlib._bootstrap._os.environ:
|
||||
if b'PYTHONCASEOK' in self.importlib._bootstrap_external._os.environ:
|
||||
self.skipTest('os.environ changes not reflected in '
|
||||
'_os.environ')
|
||||
sensitive, insensitive = self.sensitivity_test()
|
||||
|
@ -53,7 +53,7 @@ class CaseSensitivityTest:
|
|||
def test_insensitive(self):
|
||||
with test_support.EnvironmentVarGuard() as env:
|
||||
env.set('PYTHONCASEOK', '1')
|
||||
if b'PYTHONCASEOK' not in self.importlib._bootstrap._os.environ:
|
||||
if b'PYTHONCASEOK' not in self.importlib._bootstrap_external._os.environ:
|
||||
self.skipTest('os.environ changes not reflected in '
|
||||
'_os.environ')
|
||||
sensitive, insensitive = self.sensitivity_test()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue