mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Issue #15502: Bring the importlib ABCs into line with the current state of the import protocols given PEP 420. Original patch by Eric Snow.
This commit is contained in:
parent
a90f311d05
commit
8a9080feff
5 changed files with 127 additions and 65 deletions
|
@ -778,23 +778,32 @@ class SourceLoaderGetSourceTests(unittest.TestCase):
|
|||
expect = io.IncrementalNewlineDecoder(None, True).decode(source)
|
||||
self.assertEqual(mock.get_source(name), expect)
|
||||
|
||||
|
||||
class AbstractMethodImplTests(unittest.TestCase):
|
||||
|
||||
"""Test the concrete abstractmethod implementations."""
|
||||
|
||||
class MetaPathFinder(abc.MetaPathFinder):
|
||||
def find_module(self, fullname, path):
|
||||
super().find_module(fullname, path)
|
||||
|
||||
class PathEntryFinder(abc.PathEntryFinder):
|
||||
def find_module(self, _):
|
||||
super().find_module(_)
|
||||
|
||||
def find_loader(self, _):
|
||||
super().find_loader(_)
|
||||
|
||||
class Finder(abc.Finder):
|
||||
def find_module(self, fullname, path):
|
||||
super().find_module(fullname, path)
|
||||
|
||||
class Loader(abc.Loader):
|
||||
def load_module(self, fullname):
|
||||
super().load_module(fullname)
|
||||
def module_repr(self, module):
|
||||
super().module_repr(module)
|
||||
|
||||
class Finder(abc.Finder):
|
||||
def find_module(self, _):
|
||||
super().find_module(_)
|
||||
|
||||
def find_loader(self, _):
|
||||
super().find_loader(_)
|
||||
|
||||
class ResourceLoader(Loader, abc.ResourceLoader):
|
||||
def get_data(self, _):
|
||||
super().get_data(_)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue