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:
Brett Cannon 2009-02-21 03:15:37 +00:00
parent a2fcb1d964
commit 2dee597e05
8 changed files with 56 additions and 62 deletions

View file

@ -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'))