diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-10-12 16:42:58 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-10-12 16:42:58 (GMT) |
commit | d7f44e237013dc991ae24818493ee2d352b5b634 (patch) | |
tree | de65b3e57963fe035a7d94f1a0b4d00130483dae | |
parent | fb29e3527498a22caca6a4fc563cf868fa8c7b0c (diff) | |
download | cpython-d7f44e237013dc991ae24818493ee2d352b5b634.zip cpython-d7f44e237013dc991ae24818493ee2d352b5b634.tar.gz cpython-d7f44e237013dc991ae24818493ee2d352b5b634.tar.bz2 |
#11973: add test for previously fixed kevent signed/unsigned bug.
Patch by David Naylor.
-rw-r--r-- | Lib/test/test_kqueue.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Lib/test/test_kqueue.py b/Lib/test/test_kqueue.py index 3dffc73..1bdfec8 100644 --- a/Lib/test/test_kqueue.py +++ b/Lib/test/test_kqueue.py @@ -81,6 +81,31 @@ class TestKQueue(unittest.TestCase): self.assertEqual(ev, ev) self.assertNotEqual(ev, other) + # Issue 11973 + bignum = 0xffff + ev = select.kevent(0, 1, bignum) + self.assertEqual(ev.ident, 0) + self.assertEqual(ev.filter, 1) + self.assertEqual(ev.flags, bignum) + self.assertEqual(ev.fflags, 0) + self.assertEqual(ev.data, 0) + self.assertEqual(ev.udata, 0) + self.assertEqual(ev, ev) + self.assertNotEqual(ev, other) + + # Issue 11973 + bignum = 0xffffffff + ev = select.kevent(0, 1, 2, bignum) + self.assertEqual(ev.ident, 0) + self.assertEqual(ev.filter, 1) + self.assertEqual(ev.flags, 2) + self.assertEqual(ev.fflags, bignum) + self.assertEqual(ev.data, 0) + self.assertEqual(ev.udata, 0) + self.assertEqual(ev, ev) + self.assertNotEqual(ev, other) + + def test_queue_event(self): serverSocket = socket.socket() serverSocket.bind(('127.0.0.1', 0)) |