From: Antoine Pitrou <solipsis@pitrou.net> Date: Wed, 22 Feb 2012 00:11:31 +0000 (+0100) Subject: Try to debug sporadic test failures X-Git-Tag: v3.3.0a1~100 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abe72d7eb3c5288c35214073e2cb25a61f2174ea;p=python Try to debug sporadic test failures --- diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 3041218083..739f780cba 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -325,12 +325,15 @@ class PEP3147Tests(unittest.TestCase): self.addCleanup(cleanup) # Touch the __init__.py file. support.create_empty_file('pep3147/__init__.py') + expected___file__ = os.sep.join(('.', 'pep3147', '__init__.py')) m = __import__('pep3147') + self.assertEqual(m.__file__, expected___file__, (m.__file__, m.__path__)) # Ensure we load the pyc file. support.forget('pep3147') m = __import__('pep3147') - self.assertEqual(m.__file__, - os.sep.join(('.', 'pep3147', '__init__.py'))) + support.forget('pep3147') + sys.stdout.flush() + self.assertEqual(m.__file__, expected___file__, (m.__file__, m.__path__)) class NullImporterTests(unittest.TestCase):