diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-02-10 22:42:32 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-02-10 22:42:32 (GMT) |
commit | 6cf5c9663004e40f4f9fdf0e1f84b2580ca6e5c7 (patch) | |
tree | dc869d35af0f420aa31c8b2ab96baf4832aa57be /Lib/test/test_asyncio/test_events.py | |
parent | b825a3937cc2445de598e47bbb310d2055ed993f (diff) | |
download | cpython-6cf5c9663004e40f4f9fdf0e1f84b2580ca6e5c7.zip cpython-6cf5c9663004e40f4f9fdf0e1f84b2580ca6e5c7.tar.gz cpython-6cf5c9663004e40f4f9fdf0e1f84b2580ca6e5c7.tar.bz2 |
Issue #20505: BaseEventLoop uses again the resolution of the clock to decide if
scheduled tasks should be executed or not.
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 2a01b1c..3f99da4 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -1178,15 +1178,15 @@ class EventLoopTestsMixin: yield from asyncio.sleep(1e-4, loop=loop) yield from asyncio.sleep(1e-6, loop=loop) yield from asyncio.sleep(1e-8, loop=loop) + yield from asyncio.sleep(1e-10, loop=loop) self.loop.run_until_complete(wait()) - # The ideal number of call is 10, but on some platforms, the selector + # The ideal number of call is 12, but on some platforms, the selector # may sleep at little bit less than timeout depending on the resolution - # of the clock used by the kernel. Tolerate 5 useless calls on these - # platforms. - self.assertLessEqual(self.loop._run_once_counter, 15, - {'time_info': time.get_clock_info('time'), - 'monotonic_info': time.get_clock_info('monotonic'), + # of the clock used by the kernel. Tolerate a few useless calls on + # these platforms. + self.assertLessEqual(self.loop._run_once_counter, 20, + {'clock_resolution': self.loop._clock_resolution, 'selector': self.loop._selector.__class__.__name__}) |