[pypy-svn] pypy jit-lsprofile: Improve this test. It fails...

arigo commits-noreply at bitbucket.org
Wed Jan 5 18:19:31 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: jit-lsprofile
Changeset: r40409:7007f15fb16f
Date: 2011-01-05 18:19 +0100
http://bitbucket.org/pypy/pypy/changeset/7007f15fb16f/

Log:	Improve this test. It fails...

diff --git a/pypy/module/_lsprof/test/test_cprofile.py b/pypy/module/_lsprof/test/test_cprofile.py
--- a/pypy/module/_lsprof/test/test_cprofile.py
+++ b/pypy/module/_lsprof/test/test_cprofile.py
@@ -5,9 +5,9 @@
     from pypy.module._lsprof.interp_lsprof import read_timestamp_double
     import time
     t1 = read_timestamp_double()
-    for i in range(1000000): pass
+    time.sleep(1)
     t2 = read_timestamp_double()
-    assert t2 - t1 > 0.01 # very approxiamte test, but well
+    assert 0.9 < t2 - t1 < 1.9
 
 class AppTestCProfile(object):
     keywords = {}


More information about the Pypy-commit mailing list