aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/importlib/test/extension/test_path_hook.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-04-22 19:58:33 -0400
committerBrett Cannon <brett@python.org>2012-04-22 19:58:33 -0400
commit938d44d59c9cc142d35f51a908cabf781b482f26 (patch)
tree93d2bd601f966f742ef2f6caca7b374e84f6a0b2 /Lib/importlib/test/extension/test_path_hook.py
parent8c5e920ae3e98ebc5b37a105cf86e4c1e9649f57 (diff)
downloadcpython-938d44d59c9cc142d35f51a908cabf781b482f26.tar.gz
cpython-938d44d59c9cc142d35f51a908cabf781b482f26.zip
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.
Diffstat (limited to 'Lib/importlib/test/extension/test_path_hook.py')
-rw-r--r--Lib/importlib/test/extension/test_path_hook.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/test/extension/test_path_hook.py b/Lib/importlib/test/extension/test_path_hook.py
index 4610420d293..673c3005dd9 100644
--- a/Lib/importlib/test/extension/test_path_hook.py
+++ b/Lib/importlib/test/extension/test_path_hook.py
@@ -14,7 +14,8 @@ class PathHookTests(unittest.TestCase):
# XXX Should it only work for directories containing an extension module?
def hook(self, entry):
- return _bootstrap._file_path_hook(entry)
+ return _bootstrap.FileFinder.path_hook((_bootstrap.ExtensionFileLoader,
+ _bootstrap._suffix_list(imp.C_EXTENSION), False))(entry)
def test_success(self):
# Path hook should handle a directory where a known extension module