summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-04-18 08:28:42 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-04-18 08:28:42 (GMT)
commitc1b578608ef397dcc7a64ff1228aa770e2b65cb2 (patch)
treeb7a292eeaea24dae849bcd54ea803a5a86396d33 /Lib/test/test_asyncio
parentd274b3f1f1e2d8811733fb952c9f18d7da3a376a (diff)
downloadcpython-c1b578608ef397dcc7a64ff1228aa770e2b65cb2.zip
cpython-c1b578608ef397dcc7a64ff1228aa770e2b65cb2.tar.gz
cpython-c1b578608ef397dcc7a64ff1228aa770e2b65cb2.tar.bz2
Fix test_asyncio.test_timeout_disable()
Issue #26777: Fix random failing of the test on the "AMD64 FreeBSD 9.x 3.5" buildbot: File ".../Lib/test/test_asyncio/test_tasks.py", line 2398, in go self.assertTrue(0.09 < dt < 0.11, dt) AssertionError: False is not true : 0.11902812402695417 Replace "< 0.11" with "< 0.15".
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index 40e5f88..128b7ce 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -2395,7 +2395,9 @@ class TimeoutTests(test_utils.TestCase):
resp = yield from long_running_task()
self.assertEqual(resp, 'done')
dt = self.loop.time() - t0
- self.assertTrue(0.09 < dt < 0.11, dt)
+ # tolerate a time delta for clocks with bad resolution
+ # and slow buildbots
+ self.assertTrue(0.09 < dt < 0.15, dt)
self.loop.run_until_complete(go())
def test_raise_runtimeerror_if_no_task(self):