[pypy-commit] pypy testing-cleanup: Kill PyPyClassCollector.setup()

rlamy pypy.commits at gmail.com
Mon Jun 6 19:55:48 EDT 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: testing-cleanup
Changeset: r84986:775591186dfd
Date: 2016-06-07 00:39 +0100
http://bitbucket.org/pypy/pypy/changeset/775591186dfd/

Log:	Kill PyPyClassCollector.setup()

diff --git a/pypy/conftest.py b/pypy/conftest.py
--- a/pypy/conftest.py
+++ b/pypy/conftest.py
@@ -160,20 +160,15 @@
             if spaceconfig is not None:
                 from pypy.tool.pytest.objspace import gettestobjspace
                 appclass.obj.space = gettestobjspace(**spaceconfig)
+            else:
+                appclass.obj.space = LazyObjSpaceGetter()
             appclass.obj.runappdirect = option.runappdirect
 
     __multicall__.execute()
 
 
 class PyPyClassCollector(py.test.collect.Class):
-    # All pypy Test classes have a "space" member.
-    def setup(self):
-        cls = self.obj
-        if not hasattr(cls, 'spaceconfig'):
-            cls.space = LazyObjSpaceGetter()
-        else:
-            assert hasattr(cls, 'space') # set by pytest_runtest_setup
-        super(PyPyClassCollector, self).setup()
+    pass
 
 
 def pytest_ignore_collect(path):


More information about the pypy-commit mailing list