Commits

Amaury Forgeot d'Arc  committed d153bcf

Fix the test: fcntl is exactly the function I targeted when I changed space.c_filedescriptor_w().

  • Participants
  • Parent commits bb6d5f9
  • Branches stdlib-3.2.5

Comments (0)

Files changed (1)

File pypy/module/fcntl/test/test_fcntl.py

         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)