mirror of
https://github.com/python/cpython.git
synced 2025-10-27 03:34:32 +00:00
Do some cleanup in importlib:
+ Ditch using arguments to super(). + Ditch subclassing from object directly. + Move directory check out of chaining path hook to file path hook/finder. + Rename some classes to better reflect they are finders, not importers.
This commit is contained in:
parent
a2fcb1d964
commit
2dee597e05
8 changed files with 56 additions and 62 deletions
|
|
@ -10,7 +10,7 @@ class PathHookTest(unittest.TestCase):
|
|||
def test_success(self):
|
||||
# XXX Only work on existing directories?
|
||||
with source_util.create_modules('dummy') as mapping:
|
||||
self.assert_(hasattr(importlib.FileImporter(mapping['.root']),
|
||||
self.assert_(hasattr(importlib.FileFinder(mapping['.root']),
|
||||
'find_module'))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue