Commits

Anonymous committed b9c45e1

Fixed last two failing tests.

Comments (0)

Files changed (1)

Lib/importlib/test/engine/test_path.py

 
     def test_failure(self):
         # Test None returned upon not finding a suitable finder.
-        module = '<test module>'
-        self.assertTrue(engine.PathFinder.find_module(module) is None)
+        with util.import_state(path_importer_cache={}):
+        	module = '<test module>'
+        	self.assertTrue(engine.PathFinder.find_module(module) is None)
 
     def test_sys_path(self):
         # Test that ImportEngine.path is used when 'path' is None.
     def test_path_importer_cache_has_None(self):
         # Test that if sys.path_importer_cache has None that None is returned.
         clear_cache = {path: None for path in sys.path}
-        self.engine.path_importer_cache=clear_cache
+        sys.path_importer_cache=clear_cache
         for name in ('asynchat', 'sys', '<test module>'):
             self.assertTrue(engine.PathFinder.find_module(name) is None)