diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_importhooks.py | 4 | ||||
-rw-r--r-- | Lib/test/test_threaded_import.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_importhooks.py b/Lib/test/test_importhooks.py index 7a256570cb..2a22d1a186 100644 --- a/Lib/test/test_importhooks.py +++ b/Lib/test/test_importhooks.py @@ -215,7 +215,7 @@ class ImportHooksTestCase(ImportHooksBaseTestCase): self.doTestImports(i) def testPathHook(self): - sys.path_hooks.append(PathImporter) + sys.path_hooks.insert(0, PathImporter) sys.path.append(test_path) self.doTestImports() @@ -228,7 +228,7 @@ class ImportHooksTestCase(ImportHooksBaseTestCase): def testImpWrapper(self): i = ImpWrapper() sys.meta_path.append(i) - sys.path_hooks.append(ImpWrapper) + sys.path_hooks.insert(0, ImpWrapper) mnames = ( "colorsys", "urllib.parse", "distutils.core", "sys", ) diff --git a/Lib/test/test_threaded_import.py b/Lib/test/test_threaded_import.py index 789920b7fa..3faa1845e5 100644 --- a/Lib/test/test_threaded_import.py +++ b/Lib/test/test_threaded_import.py @@ -145,7 +145,7 @@ class ThreadedImportTests(unittest.TestCase): def path_hook(path): finder.find_module('') raise ImportError - sys.path_hooks.append(path_hook) + sys.path_hooks.insert(0, path_hook) sys.meta_path.append(flushing_finder) try: # Flush the cache a first time |