1
from importlib import _bootstrap
10
class PathHookTests(unittest.TestCase):
12
"""Test the path hook for extension modules."""
13
# XXX Should it only succeed for pre-existing directories?
14
# XXX Should it only work for directories containing an extension module?
16
def hook(self, entry):
17
return _bootstrap._ExtensionFileFinder(entry)
19
def test_success(self):
20
# Path hook should handle a directory where a known extension module
22
self.assert_(hasattr(self.hook(util.PATH), 'find_module'))
26
from test.support import run_unittest
27
run_unittest(PathHookTests)
30
if __name__ == '__main__':