From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 11 Sep 2019 14:37:38 +0000 (-0700) Subject: closes bpo-37252: Fix devpoll tests. (GH-14017) (GH-15948) X-Git-Tag: v3.8.0rc1~180 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4808c1265722b8a03ab436e37c7c337074acb15;p=python closes bpo-37252: Fix devpoll tests. (GH-14017) (GH-15948) (cherry picked from commit 95da826db9ed4acbc81f32296f14429c06bd2124) Co-authored-by: Jakub KulĂ­k --- diff --git a/Lib/test/test_devpoll.py b/Lib/test/test_devpoll.py index c133c811b1..110c006862 100644 --- a/Lib/test/test_devpoll.py +++ b/Lib/test/test_devpoll.py @@ -109,7 +109,7 @@ class DevPollTests(unittest.TestCase): # operations must fail with ValueError("I/O operation on closed ...") self.assertRaises(ValueError, devpoll.modify, fd, select.POLLIN) 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) def test_fd_non_inheritable(self): @@ -122,9 +122,9 @@ class DevPollTests(unittest.TestCase): w, r = os.pipe() pollster.register(w) # 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.modify, 1, -1) + self.assertRaises(ValueError, pollster.modify, 1, -1) self.assertRaises(OverflowError, pollster.modify, 1, 1 << 64) @cpython_only diff --git a/Misc/NEWS.d/next/Tests/2019-06-12-14-30-29.bpo-37252.4o-uLs.rst b/Misc/NEWS.d/next/Tests/2019-06-12-14-30-29.bpo-37252.4o-uLs.rst new file mode 100644 index 0000000000..1bd7d2872f --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2019-06-12-14-30-29.bpo-37252.4o-uLs.rst @@ -0,0 +1,2 @@ +Fix assertions in ``test_close`` and ``test_events_mask_overflow`` devpoll +tests.