Add a tiny sleep and additional flush to force the file to really be synced.

This commit is contained in:
Neal Norwitz 2008-01-27 17:10:50 +00:00
parent b3c8243c47
commit 041ee5d373
1 changed files with 5 additions and 2 deletions

View File

@ -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: