mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Issue #20452: test_asyncio: Add more info if the test fails
This commit is contained in:
parent
1506df2655
commit
62510dced9
1 changed files with 7 additions and 2 deletions
|
@ -120,8 +120,13 @@ class BaseEventLoopTests(unittest.TestCase):
|
||||||
self.loop.call_at(when, cb)
|
self.loop.call_at(when, cb)
|
||||||
t0 = self.loop.time()
|
t0 = self.loop.time()
|
||||||
self.loop.run_forever()
|
self.loop.run_forever()
|
||||||
t1 = self.loop.time()
|
dt = self.loop.time() - t0
|
||||||
self.assertTrue(0.09 <= t1-t0 <= 0.9, t1-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')))
|
||||||
|
|
||||||
def test_run_once_in_executor_handle(self):
|
def test_run_once_in_executor_handle(self):
|
||||||
def cb():
|
def cb():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue