summaryrefslogtreecommitdiffstats
path: root/Lib/test/eintrdata
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-30 19:59:21 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-03-30 19:59:21 (GMT)
commit41eba224de4d4752346ab051b6a411ec6f4a29fb (patch)
tree0bf84e5e39ab19990fa9ae6a0382d99ff5992558 /Lib/test/eintrdata
parent3c7d6e069331ceab0da6b794e4069f07bb3d4aac (diff)
downloadcpython-41eba224de4d4752346ab051b6a411ec6f4a29fb.zip
cpython-41eba224de4d4752346ab051b6a411ec6f4a29fb.tar.gz
cpython-41eba224de4d4752346ab051b6a411ec6f4a29fb.tar.bz2
Issue #23485: select.epoll.poll() is now retried when interrupted by a signal
Diffstat (limited to 'Lib/test/eintrdata')
-rw-r--r--Lib/test/eintrdata/eintr_tester.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/eintrdata/eintr_tester.py b/Lib/test/eintrdata/eintr_tester.py
index 3da964d..0df9762 100644
--- a/Lib/test/eintrdata/eintr_tester.py
+++ b/Lib/test/eintrdata/eintr_tester.py
@@ -329,6 +329,17 @@ class SelectEINTRTest(EINTRBaseTest):
dt = time.monotonic() - t0
self.assertGreaterEqual(dt, self.sleep_time)
+ @unittest.skipUnless(hasattr(select, 'epoll'), 'need select.epoll')
+ def test_epoll(self):
+ poller = select.epoll()
+ self.addCleanup(poller.close)
+
+ t0 = time.monotonic()
+ poller.poll(self.sleep_time)
+ self.stop_alarm()
+ dt = time.monotonic() - t0
+ self.assertGreaterEqual(dt, self.sleep_time)
+
def test_main():
support.run_unittest(