[pypy-svn] pypy jitypes2: a failing test

antocuni commits-noreply at bitbucket.org
Tue Jan 25 16:38:36 CET 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: jitypes2
Changeset: r41302:adec5192770d
Date: 2011-01-25 16:38 +0100
http://bitbucket.org/pypy/pypy/changeset/adec5192770d/

Log:	a failing test

diff --git a/pypy/module/test_lib_pypy/ctypes_tests/test_functions.py b/pypy/module/test_lib_pypy/ctypes_tests/test_functions.py
--- a/pypy/module/test_lib_pypy/ctypes_tests/test_functions.py
+++ b/pypy/module/test_lib_pypy/ctypes_tests/test_functions.py
@@ -445,3 +445,20 @@
         assert ptr is not None
         assert tf_b(-126) == -42
         assert tf_b._ptr is ptr
+
+    def test_errcheck(self):
+        py.test.skip('fixme')
+        def errcheck(result, func, args):
+            assert result == -42
+            assert type(result) is int
+            arg, = args
+            assert arg == -126
+            assert type(arg) is int
+            return result
+        #
+        tf_b = dll.tf_b
+        tf_b.restype = c_byte
+        tf_b.argtypes = (c_byte,)
+        tf_b.errcheck = errcheck
+        assert tf_b(-126) == -42
+        del tf_b.errcheck


More information about the Pypy-commit mailing list