[pypy-commit] pypy default: Skip pyrepl tests on CPython if it's not available

rlamy pypy.commits at gmail.com
Sun Dec 16 12:08:30 EST 2018


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: 
Changeset: r95504:0df22478e494
Date: 2018-12-16 17:07 +0000
http://bitbucket.org/pypy/pypy/changeset/0df22478e494/

Log:	Skip pyrepl tests on CPython if it's not available

diff --git a/extra_tests/test_pyrepl/conftest.py b/extra_tests/test_pyrepl/conftest.py
new file mode 100644
--- /dev/null
+++ b/extra_tests/test_pyrepl/conftest.py
@@ -0,0 +1,8 @@
+import sys
+
+def pytest_ignore_collect(path):
+    if '__pypy__' not in sys.builtin_module_names:
+        try:
+            import pyrepl
+        except ImportError:
+            return True


More information about the pypy-commit mailing list