summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-01-27 17:10:50 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2008-01-27 17:10:50 (GMT)
commit041ee5d373d7a335dcb2ad80268de29182789937 (patch)
treec47a9021f882d42ea89efbd9252eeffe5a4ff9a3 /Lib
parentb3c8243c4744ab7971d5fe21828b09511954e90f (diff)
downloadcpython-041ee5d373d7a335dcb2ad80268de29182789937.zip
cpython-041ee5d373d7a335dcb2ad80268de29182789937.tar.gz
cpython-041ee5d373d7a335dcb2ad80268de29182789937.tar.bz2
Add a tiny sleep and additional flush to force the file to really be synced.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_resource.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
index f7c2976..496259f 100644
--- a/Lib/test/test_resource.py
+++ b/Lib/test/test_resource.py
@@ -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 @@ class ResourceTest(unittest.TestCase):
# 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: