]> granicus.if.org Git - python/commitdiff
Issue #14080: fix sporadic test_imp failure. Patch by Stefan Krah.
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 26 Feb 2012 17:09:50 +0000 (18:09 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 26 Feb 2012 17:09:50 +0000 (18:09 +0100)
Lib/test/test_imp.py

index 4d690e8624d35dac78c80c3c3e066f55bbf55643..d60e2fc91aa4c5d27a7d64a40f4461d25cf97e0b 100644 (file)
@@ -325,6 +325,7 @@ class PEP3147Tests(unittest.TestCase):
         self.addCleanup(cleanup)
         # Touch the __init__.py file.
         support.create_empty_file('pep3147/__init__.py')
+        importlib.invalidate_caches()
         expected___file__ = os.sep.join(('.', 'pep3147', '__init__.py'))
         m = __import__('pep3147')
         self.assertEqual(m.__file__, expected___file__, (m.__file__, m.__path__))