[Python-checkins] cpython (merge 3.3 -> default): (Merge 3.3) Issue #20311: Try to fix the unit test, use time.monotonic()

victor.stinner python-checkins at python.org
Tue Jan 21 02:38:52 CET 2014


http://hg.python.org/cpython/rev/26c54e9a933b
changeset:   88596:26c54e9a933b
parent:      88594:e042ea77a152
parent:      88595:e1619465c49d
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Tue Jan 21 02:38:33 2014 +0100
summary:
  (Merge 3.3) Issue #20311: Try to fix the unit test, use time.monotonic()
instead of time.perf_counter()

files:
  Lib/test/test_epoll.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_epoll.py b/Lib/test/test_epoll.py
--- a/Lib/test/test_epoll.py
+++ b/Lib/test/test_epoll.py
@@ -260,9 +260,9 @@
         epoll = select.epoll()
         self.addCleanup(epoll.close)
         for timeout in (1e-2, 1e-3, 1e-4):
-            t0 = time.perf_counter()
+            t0 = time.monotonic()
             epoll.poll(timeout)
-            dt = time.perf_counter() - t0
+            dt = time.monotonic() - t0
             self.assertGreaterEqual(dt, timeout)
 
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list