[pypy-svn] r61610 - pypy/trunk/pypy/rlib/test

arigo at codespeak.net arigo at codespeak.net
Sat Feb 7 16:38:07 CET 2009


Author: arigo
Date: Sat Feb  7 16:38:06 2009
New Revision: 61610

Modified:
   pypy/trunk/pypy/rlib/test/test_rpoll.py
Log:
Split test_select() in two parts to know more precisely which part fails
occasionally on http://codespeak.net:8099/summary .

Increased the delay from 1.0 to 5.0 seconds, which (if it is the problem)
might solve it.


Modified: pypy/trunk/pypy/rlib/test/test_rpoll.py
==============================================================================
--- pypy/trunk/pypy/rlib/test/test_rpoll.py	(original)
+++ pypy/trunk/pypy/rlib/test/test_rpoll.py	Sat Feb  7 16:38:06 2009
@@ -50,7 +50,6 @@
     serv.close()
 
 def test_select():
-    from time import time
     def f():
         readend, writeend = os.pipe()
         try:
@@ -64,16 +63,20 @@
         finally:
             os.close(readend)
             os.close(writeend)
+    f()
+    interpret(f, [])
 
+def test_select_timeout():
+    from time import time
+    def f():
         # once there was a bug where the sleeping time was doubled
         a = time()
-        iwtd, owtd, ewtd = select([], [], [], 1.0)
+        iwtd, owtd, ewtd = select([], [], [], 5.0)
         diff = time() - a
-        assert 0.9 < diff < 1.1
-
-    f()
+        assert 4.8 < diff < 9.0
     interpret(f, [])
 
+
 def test_translate():
     from pypy.translator.c.test.test_genc import compile
 



More information about the Pypy-commit mailing list