Author: Amaury Forgeot d'Arc <[email protected]>
Branch: stdlib-3.2.5
Changeset: r70428:d153bcff0b93
Date: 2014-04-04 00:11 +0200
http://bitbucket.org/pypy/pypy/changeset/d153bcff0b93/
Log: Fix the test: fcntl is exactly the function I targeted when I
changed space.c_filedescriptor_w().
diff --git a/pypy/module/fcntl/test/test_fcntl.py
b/pypy/module/fcntl/test/test_fcntl.py
--- a/pypy/module/fcntl/test/test_fcntl.py
+++ b/pypy/module/fcntl/test/test_fcntl.py
@@ -37,14 +37,10 @@
raises(TypeError, fcntl.fcntl, f, "foo")
exc = raises(TypeError, fcntl.fcntl, F("foo"), 1)
assert str(exc.value) == 'fileno() returned a non-integer'
- exc = raises(ValueError, fcntl.fcntl, 2147483647 + 1, 1, 0)
- assert str(exc.value) == 'file descriptor cannot be a negative integer
(-1)'
- exc = raises(ValueError, fcntl.fcntl, F(2147483647 + 1), 1, 0)
- assert str(exc.value) == 'file descriptor cannot be a negative integer
(-1)'
- exc = raises(ValueError, fcntl.fcntl, -2147483648 - 1, 1, 0)
- assert str(exc.value) == 'file descriptor cannot be a negative integer
(-1)'
- exc = raises(ValueError, fcntl.fcntl, F(-2147483648 - 1), 1, 0)
- assert str(exc.value) == 'file descriptor cannot be a negative integer
(-1)'
+ exc = raises(OverflowError, fcntl.fcntl, 2147483647 + 1, 1, 0)
+ exc = raises(OverflowError, fcntl.fcntl, F(2147483647 + 1), 1, 0)
+ exc = raises(OverflowError, fcntl.fcntl, -2147483648 - 1, 1, 0)
+ exc = raises(OverflowError, fcntl.fcntl, F(-2147483648 - 1), 1, 0)
raises(ValueError, fcntl.fcntl, -1, 1, 0)
raises(ValueError, fcntl.fcntl, F(-1), 1, 0)
raises(ValueError, fcntl.fcntl, F(int(-1)), 1, 0)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit