[pypy-svn] pypy subrepo-removal: skip the libpypy/test_distributed tests if greenlet is missing

RonnyPfannschmidt commits-noreply at bitbucket.org
Mon Mar 21 22:26:32 CET 2011


Author: Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
Branch: subrepo-removal
Changeset: r42832:491e770599a2
Date: 2011-03-21 22:11 +0100
http://bitbucket.org/pypy/pypy/changeset/491e770599a2/

Log:	skip the libpypy/test_distributed tests if greenlet is missing

diff --git a/pypy/module/test_lib_pypy/test_distributed/test_distributed.py b/pypy/module/test_lib_pypy/test_distributed/test_distributed.py
--- a/pypy/module/test_lib_pypy/test_distributed/test_distributed.py
+++ b/pypy/module/test_lib_pypy/test_distributed/test_distributed.py
@@ -91,19 +91,22 @@
 class AppTestDistributedTasklets(object):
     spaceconfig = {"objspace.std.withtproxy": True,
                    "objspace.usemodules._stackless": True}
+    reclimit = sys.getrecursionlimit()
+
     def setup_class(cls):
+        import py.test
+        py.test.importorskip('greenlet')
         #cls.space = gettestobjspace(**{"objspace.std.withtproxy": True,
         #    "usemodules":("_stackless",)})
         cls.w_test_env_ = cls.space.appexec([], """():
         from distributed import test_env
         return (test_env,)
         """)
-        cls.reclimit = sys.getrecursionlimit()
         sys.setrecursionlimit(100000)
 
     def teardown_class(cls):
         sys.setrecursionlimit(cls.reclimit)
-    
+
     def test_remote_protocol_call(self):
         def f(x, y):
             return x + y


More information about the Pypy-commit mailing list