summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_base_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-02-03 22:59:52 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-02-03 22:59:52 (GMT)
commit1703bbbf899da639d75d7300afebb12f5fb2a8c6 (patch)
tree471ca402ca5d58fa2951369736effea02b723320 /Lib/test/test_asyncio/test_base_events.py
parente48d4db000b600e839273d60835f2c1b80f0264f (diff)
downloadcpython-1703bbbf899da639d75d7300afebb12f5fb2a8c6.zip
cpython-1703bbbf899da639d75d7300afebb12f5fb2a8c6.tar.gz
cpython-1703bbbf899da639d75d7300afebb12f5fb2a8c6.tar.bz2
Oops, undo unwanted changes in test_asyncio: mistakes of my the last sync with
Tulip (changeset d7ac90c0463a)
Diffstat (limited to 'Lib/test/test_asyncio/test_base_events.py')
-rw-r--r--Lib/test/test_asyncio/test_base_events.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
index 72f5c8a..1db7723 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -116,17 +116,18 @@ class BaseEventLoopTests(unittest.TestCase):
self.loop.stop()
self.loop._process_events = unittest.mock.Mock()
- when = self.loop.time() + 0.1
+ delay = 0.1
+
+ when = self.loop.time() + delay
self.loop.call_at(when, cb)
t0 = self.loop.time()
self.loop.run_forever()
dt = self.loop.time() - t0
- self.assertTrue(0.09 <= dt <= 0.9,
- # Issue #20452: add more info in case of failure,
- # to try to investigate the bug
- (dt,
- self.loop._granularity,
- time.get_clock_info('monotonic')))
+
+ self.assertGreaterEqual(dt, delay - self.loop._granularity, dt)
+ # tolerate a difference of +800 ms because some Python buildbots
+ # are really slow
+ self.assertLessEqual(dt, 0.9, dt)
def test_run_once_in_executor_handle(self):
def cb():