mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #23485: select.devpoll.poll() is now retried when interrupted by a signal
This commit is contained in:
parent
4448c08451
commit
45ca48b03d
5 changed files with 85 additions and 49 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue