[pypy-commit] pypy default: Skip some of these tests in case of runappdirect (they are also in ../test_pypy_c/cffi_tests)

arigo noreply at buildbot.pypy.org
Tue May 19 22:10:20 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r77412:fec3609da386
Date: 2015-05-19 22:10 +0200
http://bitbucket.org/pypy/pypy/changeset/fec3609da386/

Log:	Skip some of these tests in case of runappdirect (they are also in
	../test_pypy_c/cffi_tests)

diff --git a/pypy/module/_cffi_backend/newtype.py b/pypy/module/_cffi_backend/newtype.py
--- a/pypy/module/_cffi_backend/newtype.py
+++ b/pypy/module/_cffi_backend/newtype.py
@@ -48,8 +48,9 @@
 def _clean_cache(space):
     "NOT_RPYTHON"
     from pypy.module._cffi_backend.realize_c_type import RealizeCache
-    space.fromcache(UniqueCache).__init__(space)
-    space.fromcache(RealizeCache).__init__(space)
+    if hasattr(space, 'fromcache'):   # not with the TinyObjSpace
+        space.fromcache(UniqueCache).__init__(space)
+        space.fromcache(RealizeCache).__init__(space)
 
 # ____________________________________________________________
 
diff --git a/pypy/module/_cffi_backend/test/test_recompiler.py b/pypy/module/_cffi_backend/test/test_recompiler.py
--- a/pypy/module/_cffi_backend/test/test_recompiler.py
+++ b/pypy/module/_cffi_backend/test/test_recompiler.py
@@ -70,6 +70,8 @@
     spaceconfig = dict(usemodules=['_cffi_backend', 'imp'])
 
     def setup_class(cls):
+        if cls.runappdirect:
+            py.test.skip("not a test for -A")
         cls.w_prepare = cls.space.wrap(interp2app(prepare))
 
     def setup_method(self, meth):


More information about the pypy-commit mailing list