From 412dc9c88f040abf4b23017c5e5e4d8b880d247d Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 27 Jan 2008 18:55:54 +0000 Subject: Merged revisions 60350-60363 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r60355 | neal.norwitz | 2008-01-27 18:10:14 +0100 (Sun, 27 Jan 2008) | 1 line Whitespace cleanup ........ r60356 | neal.norwitz | 2008-01-27 18:10:29 +0100 (Sun, 27 Jan 2008) | 1 line Add assertion that we do not blow out newl ........ r60357 | neal.norwitz | 2008-01-27 18:10:35 +0100 (Sun, 27 Jan 2008) | 1 line Initialize variable to prevent warning on some platform/config. ........ r60358 | neal.norwitz | 2008-01-27 18:10:43 +0100 (Sun, 27 Jan 2008) | 1 line Update to newer version of ffi. Fixes crashes and test failures of longdouble ........ r60359 | neal.norwitz | 2008-01-27 18:10:50 +0100 (Sun, 27 Jan 2008) | 1 line Add a tiny sleep and additional flush to force the file to really be synced. ........ r60360 | neal.norwitz | 2008-01-27 18:10:58 +0100 (Sun, 27 Jan 2008) | 1 line Retry connection in case it fails to reduce flakiness ........ r60361 | neal.norwitz | 2008-01-27 18:11:11 +0100 (Sun, 27 Jan 2008) | 4 lines Catch socket errors that are often the cause of transient failures. Many of these exceptions are due to resource unavailable, so the existing code should be able to handle many more spurious errors. ........ r60362 | neal.norwitz | 2008-01-27 18:12:15 +0100 (Sun, 27 Jan 2008) | 1 line Reduce buffer size since we do not need 1k ........ r60363 | neal.norwitz | 2008-01-27 18:13:07 +0100 (Sun, 27 Jan 2008) | 1 line Print periodic "still working" messages since this suite is slow. ........ --- Lib/test/test_resource.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Lib/test/test_resource.py') diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py index 987c8d72fe9..43ff3728c90 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: -- cgit v1.2.3