aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit45a5e3afe52ed89f298242143c5f7e2bb992ac63 (patch)
tree2255a23f991f1452335d865939f6c30d7b2d7d48 /Lib/importlib/test/source/test_path_hook.py
parent4afc1c08d04a9c083b654178ea4f947563510836 (diff)
downloadcpython-45a5e3afe52ed89f298242143c5f7e2bb992ac63.tar.gz
cpython-45a5e3afe52ed89f298242143c5f7e2bb992ac63.zip
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 54c06995014..00000000000
--- 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()