summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-02-03 22:59:52 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-02-03 22:59:52 (GMT)
commit1703bbbf899da639d75d7300afebb12f5fb2a8c6 (patch)
tree471ca402ca5d58fa2951369736effea02b723320 /Lib/test/test_asyncio/test_events.py
parente48d4db000b600e839273d60835f2c1b80f0264f (diff)
downloadcpython-1703bbbf899da639d75d7300afebb12f5fb2a8c6.zip
cpython-1703bbbf899da639d75d7300afebb12f5fb2a8c6.tar.gz
cpython-1703bbbf899da639d75d7300afebb12f5fb2a8c6.tar.bz2
Oops, undo unwanted changes in test_asyncio: mistakes of my the last sync with
Tulip (changeset d7ac90c0463a)
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
-rw-r--r--Lib/test/test_asyncio/test_events.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 5158430..c11d20f 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -1185,6 +1185,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: