summaryrefslogtreecommitdiffstats
path: root/Lib/test/eintrdata
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-31 10:10:33 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-03-31 10:10:33 (GMT)
commit45ca48b03d08cdc9959e0577bc84b845931112f6 (patch)
treeeb66f50e3fb83a117fdb522531b8123b3353a4e7 /Lib/test/eintrdata
parent4448c08451e947ccf197742d22fa49adba71e363 (diff)
downloadcpython-45ca48b03d08cdc9959e0577bc84b845931112f6.zip
cpython-45ca48b03d08cdc9959e0577bc84b845931112f6.tar.gz
cpython-45ca48b03d08cdc9959e0577bc84b845931112f6.tar.bz2
Issue #23485: select.devpoll.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 4e9b992..f755880 100644
--- a/Lib/test/eintrdata/eintr_tester.py
+++ b/Lib/test/eintrdata/eintr_tester.py
@@ -351,6 +351,17 @@ class SelectEINTRTest(EINTRBaseTest):
self.stop_alarm()
self.assertGreaterEqual(dt, self.sleep_time)
+ @unittest.skipUnless(hasattr(select, 'devpoll'), 'need select.devpoll')
+ def test_devpoll(self):
+ poller = select.devpoll()
+ self.addCleanup(poller.close)
+
+ t0 = time.monotonic()
+ poller.poll(self.sleep_time * 1e3)
+ dt = time.monotonic() - t0
+ self.stop_alarm()
+ self.assertGreaterEqual(dt, self.sleep_time)
+
def test_main():
support.run_unittest(