mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Issue #14605: Expose importlib.abc.FileLoader and
importlib.machinery.(FileFinder, SourceFileLoader, _SourcelessFileLoader, ExtensionFileLoader). This exposes all of importlib's mechanisms that will become public on the sys module.
This commit is contained in:
parent
8c5e920ae3
commit
938d44d59c
17 changed files with 3246 additions and 3076 deletions
|
|
@ -12,7 +12,7 @@ class LoaderTests(abc.LoaderTests):
|
|||
"""Test load_module() for extension modules."""
|
||||
|
||||
def load_module(self, fullname):
|
||||
loader = _bootstrap._ExtensionFileLoader(ext_util.NAME,
|
||||
loader = _bootstrap.ExtensionFileLoader(ext_util.NAME,
|
||||
ext_util.FILEPATH)
|
||||
return loader.load_module(fullname)
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ class LoaderTests(abc.LoaderTests):
|
|||
self.assertEqual(getattr(module, attr), value)
|
||||
self.assertTrue(ext_util.NAME in sys.modules)
|
||||
self.assertTrue(isinstance(module.__loader__,
|
||||
_bootstrap._ExtensionFileLoader))
|
||||
_bootstrap.ExtensionFileLoader))
|
||||
|
||||
def test_package(self):
|
||||
# Extensions are not found in packages.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue