[Python-checkins] cpython (merge 3.3 -> default): (Merge 3.3) Close #19999: tolerate coarse time when testing time.monotonic() on
victor.stinner
python-checkins at python.org
Mon Dec 16 22:39:26 CET 2013
http://hg.python.org/cpython/rev/a34582c53911
changeset: 88010:a34582c53911
parent: 88008:07869026b13b
parent: 88009:4864c0b914ae
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Dec 16 22:38:46 2013 +0100
summary:
(Merge 3.3) Close #19999: tolerate coarse time when testing time.monotonic() on
very busy/slow buildbot
files:
Lib/test/test_time.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -384,7 +384,7 @@
t2 = time.monotonic()
dt = t2 - t1
self.assertGreater(t2, t1)
- self.assertAlmostEqual(dt, 0.5, delta=0.2)
+ self.assertTrue(0.5 <= dt <= 1.0, dt)
# monotonic() is a monotonic but non adjustable clock
info = time.get_clock_info('monotonic')
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list