summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_selectors.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-01-25 13:43:45 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-01-25 13:43:45 (GMT)
commit2041859f279423c06a707899b4a66e3f0aba3dfb (patch)
treeefc451d36c521f99174c6bc4689bc14e0afc1f8e /Lib/test/test_selectors.py
parent38c72bd1996164a6f3f90df998f0b9627b07138a (diff)
downloadcpython-2041859f279423c06a707899b4a66e3f0aba3dfb.zip
cpython-2041859f279423c06a707899b4a66e3f0aba3dfb.tar.gz
cpython-2041859f279423c06a707899b4a66e3f0aba3dfb.tar.bz2
Issue #20311: Revert e042ea77a152 and 7ce7295393c2, PollSelector.select() and
EpollSelector.select() round again the timeout towards zero
Diffstat (limited to 'Lib/test/test_selectors.py')
-rw-r--r--Lib/test/test_selectors.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/Lib/test/test_selectors.py b/Lib/test/test_selectors.py
index 130e0a8..5292904 100644
--- a/Lib/test/test_selectors.py
+++ b/Lib/test/test_selectors.py
@@ -363,25 +363,6 @@ class BaseSelectorTestCase(unittest.TestCase):
self.assertFalse(s.select(2))
self.assertLess(time() - t, 2.5)
- def test_timeout_rounding(self):
- # Issue #20311: Timeout must be rounded away from zero to wait *at
- # least* timeout seconds. For example, epoll_wait() has a resolution of
- # 1 ms (10^-3), epoll.select(0.0001) must wait 1 ms, not 0 ms.
- s = self.SELECTOR()
- self.addCleanup(s.close)
-
- rd, wr = self.make_socketpair()
- s.register(rd, selectors.EVENT_READ)
-
- for timeout in (1e-2, 1e-3, 1e-4):
- t0 = perf_counter()
- s.select(timeout)
- dt = perf_counter() - t0
- clock = get_clock_info('perf_counter')
- self.assertGreaterEqual(dt, timeout,
- "%.30f < %.30f ; clock=%s"
- % (dt, timeout, clock))
-
class ScalableSelectorMixIn: