Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r65961:1b7efda3796a
Date: 2013-08-06 11:47 +0200
http://bitbucket.org/pypy/pypy/changeset/1b7efda3796a/

Log:    Skip the curses test when running on top of a plain CPython and CFFI
        is not installed, or a wrong version.

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
@@ -1,6 +1,15 @@
+import pytest
+
+# 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".
+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
 
-import pytest
 
 lib = _curses.lib
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to