]> granicus.if.org Git - python/commitdiff
test_asyncio: fix test_timeout_time()
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 1 Feb 2016 11:39:50 +0000 (12:39 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 1 Feb 2016 11:39:50 +0000 (12:39 +0100)
Accept time delta up to 0.12 second, instead of 0.11, for the "AMD64 FreeBSD
9.x" buildbot slave.

Lib/test/test_asyncio/test_tasks.py

index 42e30a4d7638edc5c2f1b5ac7cc6a625af8b068c..c9d49f047c43696000bf3edb5460342cfd1fb2cc 100644 (file)
@@ -2352,7 +2352,8 @@ class TimeoutTests(test_utils.TestCase):
                         foo_running = False
 
             dt = self.loop.time() - start
-            self.assertTrue(0.09 < dt < 0.11, dt)
+            # tolerate a small delta for slow delta or unstable clocks
+            self.assertTrue(0.09 < dt < 0.12, dt)
             self.assertFalse(foo_running)
 
         self.loop.run_until_complete(go())