[pypy-commit] pypy default: GNU library declares those things as ints. hopefully fix tests?

fijal noreply at buildbot.pypy.org
Tue Nov 13 13:14:14 CET 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r58852:348d191a00a1
Date: 2012-11-13 13:14 +0100
http://bitbucket.org/pypy/pypy/changeset/348d191a00a1/

Log:	GNU library declares those things as ints. hopefully fix tests?

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
@@ -150,13 +150,13 @@
             # We're the child
             return
         try:
-            buf = array.array('h', [0])
+            buf = array.array('i', [0])
             res = fcntl.ioctl(mfd, TIOCGPGRP, buf, True)
             assert res == 0
             assert buf[0] != 0
             expected = buf.tostring()
 
-            buf = array.array('h', [0])
+            buf = array.array('i', [0])
             res = fcntl.ioctl(mfd, TIOCGPGRP, buf)
             assert res == 0
             assert buf.tostring() == expected
@@ -166,7 +166,7 @@
 
             raises(TypeError, fcntl.ioctl, mfd, TIOCGPGRP, "\x00\x00", True)
 
-            res = fcntl.ioctl(mfd, TIOCGPGRP, "\x00\x00")
+            res = fcntl.ioctl(mfd, TIOCGPGRP, "\x00\x00\x00\x00")
             assert res == expected
         finally:
             os.close(mfd)


More information about the pypy-commit mailing list