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

@ -14,7 +14,7 @@ class PathHookTests(unittest.TestCase):
# XXX Should it only work for directories containing an extension module?
def hook(self, entry):
return importlib.ExtensionFileImporter(entry)
return importlib.ExtensionFileFinder(entry)
def test_success(self):
# Path hook should handle a directory where a known extension module