[pypy-svn] pypy default: Fix the test on 64-bit.

arigo commits-noreply at bitbucket.org
Sun Feb 13 16:06:58 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r41875:9058f6b139d0
Date: 2011-02-13 15:45 +0100
http://bitbucket.org/pypy/pypy/changeset/9058f6b139d0/

Log:	Fix the test on 64-bit.

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
@@ -198,6 +198,9 @@
         fcntl.lockf(f, fcntl.LOCK_EX | fcntl.LOCK_NB)
 
     def test_large_flag(self):
-        import fcntl
-        assert fcntl.DN_MULTISHOT < 0
+        import fcntl, sys
+        if sys.maxint == 2147483647:
+            assert fcntl.DN_MULTISHOT == -2147483648
+        else:
+            assert fcntl.DN_MULTISHOT == 2147483648
         fcntl.fcntl(0, fcntl.F_NOTIFY, fcntl.DN_MULTISHOT)


More information about the Pypy-commit mailing list