Author: Armin Rigo <[email protected]>
Branch:
Changeset: r63101:d67f1882c9ed
Date: 2013-04-06 13:18 +0200
http://bitbucket.org/pypy/pypy/changeset/d67f1882c9ed/
Log: Skip this test if the underlying modules are not installed
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
@@ -1,6 +1,15 @@
"""Tests for _sqlite3.py"""
-import pytest
+import pytest, sys
+
+if sys.version_info < (2, 7):
+ pytest.skip("_sqlite3 requires Python 2.7")
+try:
+ import _cffi_backend
+except ImportError:
+ # On CPython, "pip install cffi". On old PyPy's, no chance
+ pytest.skip("_sqlite3 requires _cffi_backend to be installed")
+
from lib_pypy import _sqlite3
def pytest_funcarg__con(request):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit