[pypy-svn] r64369 - pypy/trunk/pypy/rpython/module/test

arigo at codespeak.net arigo at codespeak.net
Sun Apr 19 15:26:14 CEST 2009


Author: arigo
Date: Sun Apr 19 15:26:13 2009
New Revision: 64369

Modified:
   pypy/trunk/pypy/rpython/module/test/test_ll_time.py
Log:
Just check that our time.time() has the same resolution as
CPython's.


Modified: pypy/trunk/pypy/rpython/module/test/test_ll_time.py
==============================================================================
--- pypy/trunk/pypy/rpython/module/test/test_ll_time.py	(original)
+++ pypy/trunk/pypy/rpython/module/test/test_ll_time.py	Sun Apr 19 15:26:13 2009
@@ -10,9 +10,10 @@
             return time.time()
         
         t0 = time.time()
-        res = self.interpret(fn, [])
+        res0 = self.interpret(fn, [])
         t1 = time.time()
-        assert t0 <= res <= t1
+        res1 = self.interpret(fn, [])
+        assert t0 <= res0 <= t1 <= res1
 
     def test_time_clock(self):
         def f():
@@ -41,16 +42,6 @@
         assert t0 <= t1
         assert t1 - t0 >= 0.15
 
-    if sys.platform == "win32":
-        def test_time_is_a_float(self):
-            def fn():
-                r1 = time.time()
-                time.sleep(0.01)
-                r2 = time.time()
-                return r1 < r2 < r1 + 1
-            res = self.interpret(fn, [])
-            assert res == True
-
 class TestLLType(BaseTestTime, LLRtypeMixin):
     pass
 



More information about the Pypy-commit mailing list