mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #22018: signal.set_wakeup_fd() now raises an OSError instead of a
ValueError on fstat() failure.
This commit is contained in:
parent
38d773bd10
commit
0bffc94d57
3 changed files with 17 additions and 6 deletions
|
@ -252,14 +252,14 @@ class WakeupFDTests(unittest.TestCase):
|
|||
|
||||
def test_invalid_fd(self):
|
||||
fd = support.make_bad_fd()
|
||||
self.assertRaises(ValueError, signal.set_wakeup_fd, fd)
|
||||
self.assertRaises(OSError, signal.set_wakeup_fd, fd)
|
||||
|
||||
def test_set_wakeup_fd_result(self):
|
||||
r1, w1 = os.pipe()
|
||||
os.close(r1)
|
||||
self.addCleanup(os.close, r1)
|
||||
self.addCleanup(os.close, w1)
|
||||
r2, w2 = os.pipe()
|
||||
os.close(r2)
|
||||
self.addCleanup(os.close, r2)
|
||||
self.addCleanup(os.close, w2)
|
||||
|
||||
signal.set_wakeup_fd(w1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue