]> granicus.if.org Git - python/commitdiff
Try to debug sporadic test failures
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 22 Feb 2012 00:11:31 +0000 (01:11 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 22 Feb 2012 00:11:31 +0000 (01:11 +0100)
Lib/test/test_imp.py

index 3041218083b4273b6d0d35491b4cfc0401a394e9..739f780cbaeb1f7755294c38fd778bc08b07684c 100644 (file)
@@ -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):