From: Victor Stinner Date: Mon, 16 Dec 2013 21:36:50 +0000 (+0100) Subject: Close #19999: tolerate coarse time when testing time.monotonic() on very X-Git-Tag: v3.4.0b2~198^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=170078804c6191eaeb6985a15a58d43ea673650e;p=thirdparty%2FPython%2Fcpython.git Close #19999: tolerate coarse time when testing time.monotonic() on very busy/slow buildbot --- diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index 2997077bcbbb..6b7a4fb7686e 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -376,7 +376,7 @@ class TimeTestCase(unittest.TestCase): 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) info = time.get_clock_info('monotonic') self.assertTrue(info.monotonic)