Author: Amaury Forgeot d'Arc <[email protected]>
Branch: less-gettestobjspace
Changeset: r58621:302e694cc32a
Date: 2012-10-29 01:54 +0100
http://bitbucket.org/pypy/pypy/changeset/302e694cc32a/

Log:    progress

diff --git a/pypy/module/test_lib_pypy/test_collections.py 
b/pypy/module/test_lib_pypy/test_collections.py
--- a/pypy/module/test_lib_pypy/test_collections.py
+++ b/pypy/module/test_lib_pypy/test_collections.py
@@ -4,8 +4,6 @@
 (not used in normal PyPy's)
 """
 
-from pypy.conftest import gettestobjspace
-
 class AppTestCollections:
     def test_copy(self):
         import _collections
diff --git a/pypy/module/test_lib_pypy/test_cstringio.py 
b/pypy/module/test_lib_pypy/test_cstringio.py
--- a/pypy/module/test_lib_pypy/test_cstringio.py
+++ b/pypy/module/test_lib_pypy/test_cstringio.py
@@ -3,11 +3,8 @@
 Tests for the PyPy cStringIO implementation.
 """
 
-from pypy.conftest import gettestobjspace
-
 class AppTestcStringIO:
     def setup_class(cls):
-        cls.space = gettestobjspace()
         cls.w_io = cls.space.appexec([], "(): import cStringIO; return 
cStringIO")
         cls.w_bytes = cls.space.wrap('some bytes')
 
diff --git a/pypy/module/test_lib_pypy/test_greenlet.py 
b/pypy/module/test_lib_pypy/test_greenlet.py
--- a/pypy/module/test_lib_pypy/test_greenlet.py
+++ b/pypy/module/test_lib_pypy/test_greenlet.py
@@ -1,9 +1,5 @@
-from pypy.conftest import gettestobjspace
-
-
 class AppTestGreenlet:
-    def setup_class(cls):
-        cls.space = gettestobjspace(usemodules=['_continuation'], 
continuation=True)
+    spaceconfig = dict(usemodules=['_continuation'], continuation=True)
 
     def test_simple(self):
         from greenlet import greenlet
diff --git a/pypy/module/test_lib_pypy/test_itertools.py 
b/pypy/module/test_lib_pypy/test_itertools.py
--- a/pypy/module/test_lib_pypy/test_itertools.py
+++ b/pypy/module/test_lib_pypy/test_itertools.py
@@ -1,8 +1,5 @@
-from pypy.conftest import gettestobjspace
-
 class AppTestItertools:
     def setup_class(cls):
-        cls.space = gettestobjspace()
         cls.w_itertools = cls.space.appexec([], "(): import itertools; return 
itertools")
 
     def test_chain(self):
diff --git a/pypy/module/test_lib_pypy/test_msvcrt.py 
b/pypy/module/test_lib_pypy/test_msvcrt.py
--- a/pypy/module/test_lib_pypy/test_msvcrt.py
+++ b/pypy/module/test_lib_pypy/test_msvcrt.py
@@ -1,4 +1,3 @@
-from pypy.conftest import gettestobjspace
 from pypy.tool.udir import udir
 import py
 import sys
diff --git a/pypy/module/test_lib_pypy/test_pwd.py 
b/pypy/module/test_lib_pypy/test_pwd.py
--- a/pypy/module/test_lib_pypy/test_pwd.py
+++ b/pypy/module/test_lib_pypy/test_pwd.py
@@ -1,11 +1,10 @@
 import py, sys
-from pypy.conftest import gettestobjspace
 
 class AppTestPwd:
+    spaceconfig = dict(usemodules=('_ffi', '_rawffi'))
     def setup_class(cls):
         if sys.platform == 'win32':
             py.test.skip("Unix only")
-        cls.space = gettestobjspace(usemodules=('_ffi', '_rawffi'))
         cls.space.appexec((), "(): import pwd")
 
     def test_getpwuid(self):
diff --git a/pypy/module/test_lib_pypy/test_stackless_pickle.py 
b/pypy/module/test_lib_pypy/test_stackless_pickle.py
--- a/pypy/module/test_lib_pypy/test_stackless_pickle.py
+++ b/pypy/module/test_lib_pypy/test_stackless_pickle.py
@@ -1,16 +1,14 @@
 import py
 py.test.skip("in-progress, maybe")
-from pypy.conftest import gettestobjspace, option
 
 class AppTest_Stackless:
+    spaceconfig = dict(usemodules=('_continuation', '_socket'))
 
     def setup_class(cls):
-        space = gettestobjspace(usemodules=('_continuation', '_socket'))
-        cls.space = space
-        if option.runappdirect:
-            cls.w_lev = space.wrap(14)
+        if cls.option.runappdirect:
+            cls.w_lev = cls.space.wrap(14)
         else:
-            cls.w_lev = space.wrap(2)
+            cls.w_lev = cls.space.wrap(2)
 
     def test_pickle(self):
         import new, sys
diff --git a/pypy/module/test_lib_pypy/test_tputil.py 
b/pypy/module/test_lib_pypy/test_tputil.py
--- a/pypy/module/test_lib_pypy/test_tputil.py
+++ b/pypy/module/test_lib_pypy/test_tputil.py
@@ -1,8 +1,5 @@
-from pypy.conftest import gettestobjspace
-
 class AppTest_make_proxy:
-    def setup_class(cls):
-        cls.space = gettestobjspace(**{"objspace.std.withtproxy": True})
+    spaceconfig = {"objspace.std.withtproxy": True}
 
     def test_errors(self):
         from tputil import make_proxy 
diff --git a/pypy/objspace/test/test_descriptor.py 
b/pypy/objspace/test/test_descriptor.py
--- a/pypy/objspace/test/test_descriptor.py
+++ b/pypy/objspace/test/test_descriptor.py
@@ -1,12 +1,4 @@
-from pypy.conftest import gettestobjspace
-
 class AppTest_Descriptor:
-
-    OPTIONS = {}
-
-    def setup_class(cls):
-        cls.space = gettestobjspace(**cls.OPTIONS)
-
     def test_non_data_descr(self):
         class X(object):
             def f(self):
diff --git a/pypy/objspace/test/test_descroperation.py 
b/pypy/objspace/test/test_descroperation.py
--- a/pypy/objspace/test/test_descroperation.py
+++ b/pypy/objspace/test/test_descroperation.py
@@ -31,12 +31,6 @@
 
 
 class AppTest_Descroperation:
-    OPTIONS = {}
-
-    def setup_class(cls):
-        from pypy import conftest
-        cls.space = conftest.gettestobjspace(**cls.OPTIONS)
-
     def test_special_methods(self):
         class OldStyle:
             pass
@@ -728,4 +722,4 @@
             
 
 class AppTestWithBuiltinShortcut(AppTest_Descroperation):
-    OPTIONS = {'objspace.std.builtinshortcut': True}
+    spaceconfig = {'objspace.std.builtinshortcut': True}
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to