[pypy-commit] pypy reflex-support: skip tests individually instead of wholesale if genreflex is missing

wlav noreply at buildbot.pypy.org
Wed Aug 14 08:45:27 CEST 2013


Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r66141:21041133c1e2
Date: 2013-08-06 05:28 -0700
http://bitbucket.org/pypy/pypy/changeset/21041133c1e2/

Log:	skip tests individually instead of wholesale if genreflex is missing

diff --git a/pypy/module/cppyy/test/conftest.py b/pypy/module/cppyy/test/conftest.py
--- a/pypy/module/cppyy/test/conftest.py
+++ b/pypy/module/cppyy/test/conftest.py
@@ -1,5 +1,1 @@
 import py
-
-def pytest_runtest_setup(item):
-    if py.path.local.sysfind('genreflex') is None:
-        py.test.skip("genreflex is not installed")
diff --git a/pypy/module/cppyy/test/test_aclassloader.py b/pypy/module/cppyy/test/test_aclassloader.py
--- a/pypy/module/cppyy/test/test_aclassloader.py
+++ b/pypy/module/cppyy/test/test_aclassloader.py
@@ -1,5 +1,7 @@
 import py, os, sys
 
+if py.path.local.sysfind('genreflex') is None:
+    py.test.skip("genreflex is not installed")
 
 currpath = py.path.local(__file__).dirpath()
 
diff --git a/pypy/module/cppyy/test/test_advancedcpp.py b/pypy/module/cppyy/test/test_advancedcpp.py
--- a/pypy/module/cppyy/test/test_advancedcpp.py
+++ b/pypy/module/cppyy/test/test_advancedcpp.py
@@ -1,5 +1,8 @@
 import py, os, sys
 
+if py.path.local.sysfind('genreflex') is None:
+    py.test.skip("genreflex is not installed")
+
 from pypy.module.cppyy import capi
 
 
diff --git a/pypy/module/cppyy/test/test_cppyy.py b/pypy/module/cppyy/test/test_cppyy.py
--- a/pypy/module/cppyy/test/test_cppyy.py
+++ b/pypy/module/cppyy/test/test_cppyy.py
@@ -1,4 +1,8 @@
 import py, os, sys
+
+if py.path.local.sysfind('genreflex') is None:
+    py.test.skip("genreflex is not installed")
+
 from pypy.module.cppyy import interp_cppyy, executor
 
 
diff --git a/pypy/module/cppyy/test/test_crossing.py b/pypy/module/cppyy/test/test_crossing.py
--- a/pypy/module/cppyy/test/test_crossing.py
+++ b/pypy/module/cppyy/test/test_crossing.py
@@ -1,4 +1,8 @@
 import py, os, sys
+
+if py.path.local.sysfind('genreflex') is None:
+    py.test.skip("genreflex is not installed")
+
 from pypy.interpreter.gateway import interp2app, unwrap_spec
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 from rpython.translator import platform
diff --git a/pypy/module/cppyy/test/test_datatypes.py b/pypy/module/cppyy/test/test_datatypes.py
--- a/pypy/module/cppyy/test/test_datatypes.py
+++ b/pypy/module/cppyy/test/test_datatypes.py
@@ -1,5 +1,7 @@
 import py, os, sys
 
+if py.path.local.sysfind('genreflex') is None:
+    py.test.skip("genreflex is not installed")
 
 currpath = py.path.local(__file__).dirpath()
 test_dct = str(currpath.join("datatypesDict.so"))
diff --git a/pypy/module/cppyy/test/test_fragile.py b/pypy/module/cppyy/test/test_fragile.py
--- a/pypy/module/cppyy/test/test_fragile.py
+++ b/pypy/module/cppyy/test/test_fragile.py
@@ -1,6 +1,11 @@
 import py, os, sys
+
+if py.path.local.sysfind('genreflex') is None:
+    py.test.skip("genreflex is not installed")
+
 from pypy.module.cppyy import capi
 
+
 currpath = py.path.local(__file__).dirpath()
 test_dct = str(currpath.join("fragileDict.so"))
 
diff --git a/pypy/module/cppyy/test/test_operators.py b/pypy/module/cppyy/test/test_operators.py
--- a/pypy/module/cppyy/test/test_operators.py
+++ b/pypy/module/cppyy/test/test_operators.py
@@ -1,5 +1,7 @@
 import py, os, sys
 
+if py.path.local.sysfind('genreflex') is None:
+    py.test.skip("genreflex is not installed")
 
 currpath = py.path.local(__file__).dirpath()
 test_dct = str(currpath.join("operatorsDict.so"))
diff --git a/pypy/module/cppyy/test/test_overloads.py b/pypy/module/cppyy/test/test_overloads.py
--- a/pypy/module/cppyy/test/test_overloads.py
+++ b/pypy/module/cppyy/test/test_overloads.py
@@ -1,5 +1,7 @@
 import py, os, sys
 
+if py.path.local.sysfind('genreflex') is None:
+    py.test.skip("genreflex is not installed")
 
 currpath = py.path.local(__file__).dirpath()
 test_dct = str(currpath.join("overloadsDict.so"))
diff --git a/pypy/module/cppyy/test/test_pythonify.py b/pypy/module/cppyy/test/test_pythonify.py
--- a/pypy/module/cppyy/test/test_pythonify.py
+++ b/pypy/module/cppyy/test/test_pythonify.py
@@ -1,4 +1,8 @@
 import py, os, sys
+
+if py.path.local.sysfind('genreflex') is None:
+    py.test.skip("genreflex is not installed")
+
 from pypy.module.cppyy import interp_cppyy, executor
 
 
diff --git a/pypy/module/cppyy/test/test_stltypes.py b/pypy/module/cppyy/test/test_stltypes.py
--- a/pypy/module/cppyy/test/test_stltypes.py
+++ b/pypy/module/cppyy/test/test_stltypes.py
@@ -1,5 +1,8 @@
 import py, os, sys
 
+if py.path.local.sysfind('genreflex') is None:
+    py.test.skip("genreflex is not installed")
+
 
 currpath = py.path.local(__file__).dirpath()
 test_dct = str(currpath.join("stltypesDict.so"))
diff --git a/pypy/module/cppyy/test/test_streams.py b/pypy/module/cppyy/test/test_streams.py
--- a/pypy/module/cppyy/test/test_streams.py
+++ b/pypy/module/cppyy/test/test_streams.py
@@ -1,5 +1,8 @@
 import py, os, sys
 
+if py.path.local.sysfind('genreflex') is None:
+    py.test.skip("genreflex is not installed")
+
 
 currpath = py.path.local(__file__).dirpath()
 test_dct = str(currpath.join("std_streamsDict.so"))


More information about the pypy-commit mailing list