[Python-checkins] r60359 - python/trunk/Lib/test/test_resource.py

neal.norwitz python-checkins at python.org
Sun Jan 27 18:10:50 CET 2008


Author: neal.norwitz
Date: Sun Jan 27 18:10:50 2008
New Revision: 60359

Modified:
   python/trunk/Lib/test/test_resource.py
Log:
Add a tiny sleep and additional flush to force the file to really be synced.

Modified: python/trunk/Lib/test/test_resource.py
==============================================================================
--- python/trunk/Lib/test/test_resource.py	(original)
+++ python/trunk/Lib/test/test_resource.py	Sun Jan 27 18:10:50 2008
@@ -1,8 +1,9 @@
 import unittest
 from test import test_support
 
-
-import os, resource
+import os
+import resource
+import time
 
 # This test is checking a few specific problem spots with the resource module.
 
@@ -59,6 +60,8 @@
                         # an attempt to ensure the file is really synced and
                         # the exception raised.
                         for i in range(5):
+                            time.sleep(.1)
+                            f.flush()
                             f.close()
                     except IOError:
                         if not limit_set:


More information about the Python-checkins mailing list