summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
-rw-r--r--Lib/test/test_asyncio/test_events.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index e6a1c97..3f99da4 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -1176,15 +1176,17 @@ class EventLoopTestsMixin:
loop = self.loop
yield from asyncio.sleep(1e-2, loop=loop)
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 6, 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 2 useless calls on these
- # platforms.
- self.assertLessEqual(self.loop._run_once_counter, 8,
- {'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__})