aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_resource.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-27 18:55:54 +0000
committerChristian Heimes <christian@cheimes.de>2008-01-27 18:55:54 +0000
commit412dc9c88f040abf4b23017c5e5e4d8b880d247d (patch)
treee10dee1ac8404c0d3362c48a4350d8e8389b7789 /Lib/test/test_resource.py
parent661b0a15d78b8e86ea4b458550b1cb04f0988424 (diff)
downloadcpython-412dc9c88f040abf4b23017c5e5e4d8b880d247d.tar.gz
cpython-412dc9c88f040abf4b23017c5e5e4d8b880d247d.zip
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. ........
Diffstat (limited to 'Lib/test/test_resource.py')
-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 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: