[pypy-commit] pypy default: Skip instead of fail if the _*_cffi.so modules have not been made

arigo noreply at buildbot.pypy.org
Sun May 31 10:41:24 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r77720:3faac0835cb6
Date: 2015-05-31 10:41 +0200
http://bitbucket.org/pypy/pypy/changeset/3faac0835cb6/

Log:	Skip instead of fail if the _*_cffi.so modules have not been made

diff --git a/pypy/module/test_lib_pypy/test_curses.py b/pypy/module/test_lib_pypy/test_curses.py
--- a/pypy/module/test_lib_pypy/test_curses.py
+++ b/pypy/module/test_lib_pypy/test_curses.py
@@ -6,11 +6,12 @@
 
 # Check that lib_pypy.cffi finds the correct version of _cffi_backend.
 # Otherwise, the test is skipped.  It should never be skipped when run
-# with "pypy py.test -A".
+# with "pypy py.test -A" and _curses_build.py has been run with pypy.
 try:
-    from lib_pypy import cffi; cffi.FFI()
-except (ImportError, AssertionError), e:
-    pytest.skip("no cffi module or wrong version (%s)" % (e,))
+    from lib_pypy import _curses_cffi
+except ImportError:
+    # On CPython, "pip install cffi".  On old PyPy's, no chance
+    pytest.skip("install cffi and run lib_pypy/_curses_build.py manually first")
 
 from lib_pypy import _curses
 
diff --git a/pypy/module/test_lib_pypy/test_sqlite3.py b/pypy/module/test_lib_pypy/test_sqlite3.py
--- a/pypy/module/test_lib_pypy/test_sqlite3.py
+++ b/pypy/module/test_lib_pypy/test_sqlite3.py
@@ -313,10 +313,11 @@
             pytest.skip("_sqlite3 requires Python 2.7")
 
         try:
-            import _cffi_backend
+            from lib_pypy import _sqlite3_cffi
         except ImportError:
             # On CPython, "pip install cffi".  On old PyPy's, no chance
-            pytest.skip("_sqlite3 requires _cffi_backend to be installed")
+            pytest.skip("install cffi and run lib_pypy/_sqlite3_build.py "
+                        "manually first")
 
         global _sqlite3
         from lib_pypy import _sqlite3


More information about the pypy-commit mailing list