From b4808c1265722b8a03ab436e37c7c337074acb15 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 11 Sep 2019 07:37:38 -0700 Subject: [PATCH] closes bpo-37252: Fix devpoll tests. (GH-14017) (GH-15948) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit (cherry picked from commit 95da826db9ed4acbc81f32296f14429c06bd2124) Co-authored-by: Jakub Kulík --- Lib/test/test_devpoll.py | 6 +++--- .../next/Tests/2019-06-12-14-30-29.bpo-37252.4o-uLs.rst | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2019-06-12-14-30-29.bpo-37252.4o-uLs.rst diff --git a/Lib/test/test_devpoll.py b/Lib/test/test_devpoll.py index c133c811b197..110c00686273 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 000000000000..1bd7d2872f13 --- /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. -- 2.47.3