Author: Brian Kearns <[email protected]>
Branch:
Changeset: r69841:096eef91e0a0
Date: 2014-03-10 11:56 -0700
http://bitbucket.org/pypy/pypy/changeset/096eef91e0a0/
Log: fix test_kqueue for new bounds checking
diff --git a/pypy/module/select/test/test_kqueue.py
b/pypy/module/select/test/test_kqueue.py
--- a/pypy/module/select/test/test_kqueue.py
+++ b/pypy/module/select/test/test_kqueue.py
@@ -74,7 +74,7 @@
assert ev != other
bignum = (sys.maxsize * 2 + 1) & 0xffffffff
- fd = sys.maxsize
+ fd = 2**31 - 1
ev = select.kevent(fd, 1, 2, bignum, sys.maxsize, bignum)
assert ev.ident == fd
assert ev.filter == 1
@@ -85,6 +85,9 @@
assert ev == ev
assert ev != other
+ exc = raises(ValueError, select.kevent, fd + 1, 1, 2, bignum,
sys.maxsize, bignum)
+ assert exc.value[0] == "file descriptor cannot be a negative integer
(-1)"
+
def test_queue_event(self):
import errno
import select
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit