cpython: 7f649ff0756c (original) (raw)
Mercurial > cpython
changeset 88856:7f649ff0756c
Issue #20452: test_asyncio: Add more info if the test fails [#20452]
Victor Stinner victor.stinner@gmail.com | |
---|---|
date | Fri, 31 Jan 2014 16:39:10 +0100 |
parents | 55abd847c9f5 |
children | 4e30f327164a |
files | Lib/test/test_asyncio/test_base_events.py |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-)[+] [-] Lib/test/test_asyncio/test_base_events.py 9 |
line wrap: on
line diff
--- a/Lib/test/test_asyncio/test_base_events.py +++ b/Lib/test/test_asyncio/test_base_events.py @@ -120,8 +120,13 @@ class BaseEventLoopTests(unittest.TestCa self.loop.call_at(when, cb) t0 = self.loop.time() self.loop.run_forever()
t1 = self.loop.time()[](#l1.7)
self.assertTrue(0.09 <= t1-t0 <= 0.9, t1-t0)[](#l1.8)
dt = self.loop.time() - t0[](#l1.9)
self.assertTrue(0.09 <= dt <= 0.9,[](#l1.10)
# Issue #20452: add more info in case of failure,[](#l1.11)
# to try to investigate the bug[](#l1.12)
(dt,[](#l1.13)
self.loop._granularity,[](#l1.14)
time.get_clock_info('monotonic')))[](#l1.15)