summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_kqueue.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-10-12 16:42:01 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-10-12 16:42:01 (GMT)
commit95cbe63001f354460d6e1794b913eb17c55dfa3e (patch)
tree3a31e9f152ce147b4757ed544c7c2e3b40c7d7c3 /Lib/test/test_kqueue.py
parent7728fe8e87f11354de72df34d294106894e87de1 (diff)
parent90f7afda613fcdc01310b86ca6fe6bcfb8ffca83 (diff)
downloadcpython-95cbe63001f354460d6e1794b913eb17c55dfa3e.zip
cpython-95cbe63001f354460d6e1794b913eb17c55dfa3e.tar.gz
cpython-95cbe63001f354460d6e1794b913eb17c55dfa3e.tar.bz2
Merge: #11973: add test for previously fixed kevent signed/unsigned bug.
Diffstat (limited to 'Lib/test/test_kqueue.py')
-rw-r--r--Lib/test/test_kqueue.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/Lib/test/test_kqueue.py b/Lib/test/test_kqueue.py
index 0810f21..2585ca6 100644
--- a/Lib/test/test_kqueue.py
+++ b/Lib/test/test_kqueue.py
@@ -86,6 +86,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))