[pypy-commit] pypy stm-gc: - Fix test.

arigo noreply at buildbot.pypy.org
Mon Apr 30 16:31:12 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: stm-gc
Changeset: r54833:23f1f1471eef
Date: 2012-04-30 16:25 +0200
http://bitbucket.org/pypy/pypy/changeset/23f1f1471eef/

Log:	- Fix test.
	- Obviously, config.translation.stm is true here. It's not that
	that we should test...

diff --git a/pypy/module/transaction/interp_transaction.py b/pypy/module/transaction/interp_transaction.py
--- a/pypy/module/transaction/interp_transaction.py
+++ b/pypy/module/transaction/interp_transaction.py
@@ -127,13 +127,13 @@
         ec = self.space.getexecutioncontext()    # create it if needed
         assert len(ec._transaction_pending) == 0
         #
-        if self.space.config.translation.stm:
+        if self.space.config.objspace.std.withmethodcache:
             from pypy.objspace.std.typeobject import MethodCache
             ec._methodcache = MethodCache(self.space)
         #
         self.space.call_args(self.w_callback, self.args)
         #
-        if self.space.config.translation.stm:
+        if self.space.config.objspace.std.withmethodcache:
             # remove the method cache again now, to prevent it from being
             # promoted to a GLOBAL
             ec._methodcache = None
diff --git a/pypy/module/transaction/test/test_epoll.py b/pypy/module/transaction/test/test_epoll.py
--- a/pypy/module/transaction/test/test_epoll.py
+++ b/pypy/module/transaction/test/test_epoll.py
@@ -1,5 +1,6 @@
 import py
 from pypy.conftest import gettestobjspace
+py.test.skip("epoll support disabled for now")
 
 
 class AppTestEpoll: 
diff --git a/pypy/module/transaction/test/test_interp_transaction.py b/pypy/module/transaction/test/test_interp_transaction.py
--- a/pypy/module/transaction/test/test_interp_transaction.py
+++ b/pypy/module/transaction/test/test_interp_transaction.py
@@ -3,6 +3,10 @@
 
 
 class FakeSpace:
+    class config:
+        class objspace:
+            class std:
+                withmethodcache = False
     def __init__(self):
         self._spacecache = {}
     def getexecutioncontext(self):


More information about the pypy-commit mailing list