summaryrefslogtreecommitdiff
path: root/Lib/importlib/test/source/test_path_hook.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-07-20 14:48:53 -0400
committerBrett Cannon <brett@python.org>2012-07-20 14:48:53 -0400
commit3c8aba5b8cdc321e6f24070ab01d7cedb348db69 (patch)
tree8c027c489c81fdf8454f7f105f0ac363a378b773 /Lib/importlib/test/source/test_path_hook.py
parent07b539fb9a1631df556d632054604bc0eb464b36 (diff)
downloadcpython-3c8aba5b8cdc321e6f24070ab01d7cedb348db69.tar.gz
Issue #15168: Move importlb.test to test.test_importlib.
This should make the Linux distros happy as it is now easier to leave importlib's tests out of their base Python distribution.
Diffstat (limited to 'Lib/importlib/test/source/test_path_hook.py')
-rw-r--r--Lib/importlib/test/source/test_path_hook.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/Lib/importlib/test/source/test_path_hook.py b/Lib/importlib/test/source/test_path_hook.py
deleted file mode 100644
index 54c0699501..0000000000
--- a/Lib/importlib/test/source/test_path_hook.py
+++ /dev/null
@@ -1,32 +0,0 @@
-from . import util as source_util
-
-from importlib import machinery
-import imp
-import unittest
-
-
-class PathHookTest(unittest.TestCase):
-
- """Test the path hook for source."""
-
- def path_hook(self):
- return machinery.FileFinder.path_hook((machinery.SourceFileLoader,
- machinery.SOURCE_SUFFIXES, True))
-
- def test_success(self):
- with source_util.create_modules('dummy') as mapping:
- self.assertTrue(hasattr(self.path_hook()(mapping['.root']),
- 'find_module'))
-
- def test_empty_string(self):
- # The empty string represents the cwd.
- self.assertTrue(hasattr(self.path_hook()(''), 'find_module'))
-
-
-def test_main():
- from test.support import run_unittest
- run_unittest(PathHookTest)
-
-
-if __name__ == '__main__':
- test_main()