From: Antoine Pitrou Date: Sun, 26 Feb 2012 17:09:50 +0000 (+0100) Subject: Issue #14080: fix sporadic test_imp failure. Patch by Stefan Krah. X-Git-Tag: v3.3.0a1~56 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f92a68a813c8a4090fd175037c494b498e62587;p=python Issue #14080: fix sporadic test_imp failure. Patch by Stefan Krah. --- diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 4d690e8624..d60e2fc91a 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -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__))