diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-01-31 15:39:10 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-01-31 15:39:10 (GMT) |
commit | 62510dced9e8242224ce3d45388eff6486e83c3c (patch) | |
tree | f93d55bc8e25a59240e6138983c8cae38326cc4a /Lib/test/test_asyncio/test_base_events.py | |
parent | 1506df265553aae4cdcda3320e1634bf1cd2476f (diff) | |
download | cpython-62510dced9e8242224ce3d45388eff6486e83c3c.zip cpython-62510dced9e8242224ce3d45388eff6486e83c3c.tar.gz cpython-62510dced9e8242224ce3d45388eff6486e83c3c.tar.bz2 |
Issue #20452: test_asyncio: Add more info if the test fails
Diffstat (limited to 'Lib/test/test_asyncio/test_base_events.py')
-rw-r--r-- | Lib/test/test_asyncio/test_base_events.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py index 9c2bda1..72f5c8a 100644 --- 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.TestCase): self.loop.call_at(when, cb) t0 = self.loop.time() self.loop.run_forever() - t1 = self.loop.time() - self.assertTrue(0.09 <= t1-t0 <= 0.9, t1-t0) + 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'))) def test_run_once_in_executor_handle(self): def cb(): |