Author: Armin Rigo <[email protected]>
Branch: cffi-1.0
Changeset: r1828:9f5ea786ded2
Date: 2015-04-26 09:23 +0200
http://bitbucket.org/cffi/cffi/changeset/9f5ea786ded2/

Log:    tweaks to tests

diff --git a/_cffi1/support.py b/_cffi1/support.py
new file mode 100644
--- /dev/null
+++ b/_cffi1/support.py
@@ -0,0 +1,6 @@
+
+class U(object):
+    def __add__(self, other):
+        return eval('u'+repr(other).replace(r'\\u', r'\u')
+                                   .replace(r'\\U', r'\U'))
+u = U()
diff --git a/_cffi1/test_recompiler.py b/_cffi1/test_recompiler.py
--- a/_cffi1/test_recompiler.py
+++ b/_cffi1/test_recompiler.py
@@ -190,7 +190,6 @@
     ffi = FFI()
     ffi.cdef("static double *const FOOBAR;")
     lib = verify(ffi, 'test_constant_ptr', "#define FOOBAR NULL")
-    py.test.skip("XXX in-progress:")
     assert lib.FOOBAR == ffi.NULL
     assert ffi.typeof(lib.FOOBAR) == ffi.typeof("double *")
 
diff --git a/_cffi1/test_verify1.py b/_cffi1/test_verify1.py
--- a/_cffi1/test_verify1.py
+++ b/_cffi1/test_verify1.py
@@ -1,6 +1,7 @@
 import sys, math, py
 from cffi import FFI, VerificationError, VerificationMissing, model
-from _cffi1 import recompiler
+from . import recompiler
+from .support import *
 import _cffi_backend
 
 lib_m = ['m']
@@ -36,12 +37,6 @@
 class FFI_warnings_not_error(FFI):
     _extra_compile_args = []
 
-class U(object):
-    def __add__(self, other):
-        return eval('u'+repr(other).replace(r'\\u', r'\u')
-                                   .replace(r'\\U', r'\U'))
-u = U()
-
 
 def test_missing_function(ffi=None):
     # uses the FFI hacked above with '-Werror'
@@ -1540,7 +1535,7 @@
     py.test.raises(TypeError, lib.sum_coord, res2)
 
 def test_callback_in_thread():
-    py.test.skip("adapt or remove")
+    py.test.xfail("adapt or remove")
     if sys.platform == 'win32':
         py.test.skip("pthread only")
     import os, subprocess, imp
@@ -1551,7 +1546,7 @@
     assert result == 0
 
 def test_keepalive_lib():
-    py.test.skip("adapt or remove")
+    py.test.xfail("adapt or remove")
     ffi = FFI()
     ffi.cdef("int foobar(void);")
     lib = ffi.verify("int foobar(void) { return 42; }")
@@ -1565,7 +1560,7 @@
     assert func() == 42
 
 def test_keepalive_ffi():
-    py.test.skip("adapt or remove")
+    py.test.xfail("adapt or remove")
     ffi = FFI()
     ffi.cdef("int foobar(void);")
     lib = ffi.verify("int foobar(void) { return 42; }")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to