[pypy-commit] cffi default: Split test_errno into two parts and skip the second part if running

arigo noreply at buildbot.pypy.org
Thu Jul 26 12:44:51 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r681:9aa039eeddeb
Date: 2012-07-26 12:44 +0200
http://bitbucket.org/cffi/cffi/changeset/9aa039eeddeb/

Log:	Split test_errno into two parts and skip the second part if running
	inside py.py on top of ll2ctypes on top of an old ctypes.

diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -1579,10 +1579,15 @@
     assert get_errno() == 65
     f(); f()
     assert get_errno() == 95
-    #
+
+def test_errno_callback():
+    if globals().get('PY_DOT_PY') == '2.5':
+        py.test.skip("cannot run this test on py.py with Python 2.5")
     def cb():
         e = get_errno()
         set_errno(e - 6)
+    BVoid = new_void_type()
+    BFunc5 = new_function_type((), BVoid)
     f = callback(BFunc5, cb)
     f()
     assert get_errno() == 89


More information about the pypy-commit mailing list