closes bpo-37252: Fix devpoll tests. (GH-14017)
This commit is contained in:
parent
4b41745b3c
commit
95da826db9
|
@ -109,7 +109,7 @@ class DevPollTests(unittest.TestCase):
|
||||||
# operations must fail with ValueError("I/O operation on closed ...")
|
# operations must fail with ValueError("I/O operation on closed ...")
|
||||||
self.assertRaises(ValueError, devpoll.modify, fd, select.POLLIN)
|
self.assertRaises(ValueError, devpoll.modify, fd, select.POLLIN)
|
||||||
self.assertRaises(ValueError, devpoll.poll)
|
self.assertRaises(ValueError, devpoll.poll)
|
||||||
self.assertRaises(ValueError, devpoll.register, fd, fd, select.POLLIN)
|
self.assertRaises(ValueError, devpoll.register, fd, select.POLLIN)
|
||||||
self.assertRaises(ValueError, devpoll.unregister, fd)
|
self.assertRaises(ValueError, devpoll.unregister, fd)
|
||||||
|
|
||||||
def test_fd_non_inheritable(self):
|
def test_fd_non_inheritable(self):
|
||||||
|
@ -122,9 +122,9 @@ class DevPollTests(unittest.TestCase):
|
||||||
w, r = os.pipe()
|
w, r = os.pipe()
|
||||||
pollster.register(w)
|
pollster.register(w)
|
||||||
# Issue #17919
|
# Issue #17919
|
||||||
self.assertRaises(OverflowError, pollster.register, 0, -1)
|
self.assertRaises(ValueError, pollster.register, 0, -1)
|
||||||
self.assertRaises(OverflowError, pollster.register, 0, 1 << 64)
|
self.assertRaises(OverflowError, pollster.register, 0, 1 << 64)
|
||||||
self.assertRaises(OverflowError, pollster.modify, 1, -1)
|
self.assertRaises(ValueError, pollster.modify, 1, -1)
|
||||||
self.assertRaises(OverflowError, pollster.modify, 1, 1 << 64)
|
self.assertRaises(OverflowError, pollster.modify, 1, 1 << 64)
|
||||||
|
|
||||||
@cpython_only
|
@cpython_only
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Fix assertions in ``test_close`` and ``test_events_mask_overflow`` devpoll
|
||||||
|
tests.
|
Loading…
Reference in New Issue