Commit a4275b27 authored by Victor Stinner's avatar Victor Stinner

(Merge 3.3) Close #19999: tolerate coarse time when testing time.monotonic() on

very busy/slow buildbot
parents 77f06111 17007880
...@@ -384,7 +384,7 @@ class TimeTestCase(unittest.TestCase): ...@@ -384,7 +384,7 @@ class TimeTestCase(unittest.TestCase):
t2 = time.monotonic() t2 = time.monotonic()
dt = t2 - t1 dt = t2 - t1
self.assertGreater(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 # monotonic() is a monotonic but non adjustable clock
info = time.get_clock_info('monotonic') info = time.get_clock_info('monotonic')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment