Commit 11442146 authored by Victor Stinner's avatar Victor Stinner

Issue #20452: test_asyncio checks also the granularity

parent 6d300d67
......@@ -1179,6 +1179,14 @@ class EventLoopTestsMixin:
calls.append(self.loop._run_once_counter)
self.assertEqual(calls, [1, 3, 5, 6])
def test_granularity(self):
granularity = self.loop._granularity
self.assertGreater(granularity, 0.0)
# Worst expected granularity: 1 ms on Linux (limited by poll/epoll
# resolution), 15.6 ms on Windows (limited by time.monotonic
# resolution)
self.assertLess(granularity, 0.050)
class SubprocessTestsMixin:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment