mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +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
|
@ -2,6 +2,7 @@ from importlib import _bootstrap
|
|||
from .. import abc
|
||||
from . import util
|
||||
|
||||
import imp
|
||||
import unittest
|
||||
|
||||
class FinderTests(abc.FinderTests):
|
||||
|
@ -9,8 +10,10 @@ class FinderTests(abc.FinderTests):
|
|||
"""Test the finder for extension modules."""
|
||||
|
||||
def find_module(self, fullname):
|
||||
importer = _bootstrap._FileFinder(util.PATH,
|
||||
_bootstrap._ExtensionFinderDetails())
|
||||
importer = _bootstrap.FileFinder(util.PATH,
|
||||
(_bootstrap.ExtensionFileLoader,
|
||||
_bootstrap._suffix_list(imp.C_EXTENSION),
|
||||
False))
|
||||
return importer.find_module(fullname)
|
||||
|
||||
def test_module(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue