[pypy-commit] lang-smalltalk default: fixed test_in_squeak_4_5_image by saving some module variables which might change due to re-including in other tests in global variables (space, interp)
lwassermann
noreply at buildbot.pypy.org
Wed May 15 09:19:10 CEST 2013
Author: Lars Wassermann <lars.wassermann at gmail.com>
Branch:
Changeset: r384:d17bd059e09a
Date: 2013-05-15 09:18 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/d17bd059e09a/
Log: fixed test_in_squeak_4_5_image by saving some module variables which
might change due to re-including in other tests in global variables
(space, interp)
diff --git a/spyvm/test/test_in_squeak_4_5_image.py b/spyvm/test/test_in_squeak_4_5_image.py
--- a/spyvm/test/test_in_squeak_4_5_image.py
+++ b/spyvm/test/test_in_squeak_4_5_image.py
@@ -5,6 +5,8 @@
from spyvm.test.test_miniimage import perform, w
tools.setup_module(tools, filename='Squeak4.5-12568.image')
+space = tools.space
+interp = tools.interp
def find_symbol_in_methoddict_of(string, s_class):
s_methoddict = s_class.s_methoddict()
@@ -26,11 +28,10 @@
w_method.tempsize = tempsize
w_method.setliterals(literals)
- s_method = w_method.as_compiledmethod_get_shadow(tools.space)
+ s_method = w_method.as_compiledmethod_get_shadow(space)
return s_method
def test_ensure():
- space = tools.space
#ensure
# [^'b1'] ensure: [^'b2']
import operator
@@ -50,14 +51,13 @@
w_frame = s_method.create_frame(space, w(0), [], sender=s_initial_frame).w_self()
try:
- tools.interp.loop(w_frame)
+ interp.loop(w_frame)
except interpreter.ReturnFromTopLevel, e:
assert e.object.as_string() == 'b2'
except interpreter.StackOverflow, e:
assert False
def test_ensure_save_original_nlr():
- space = tools.space
#ensure
# [^'b1'] ensure: ['b2']
import operator
@@ -77,7 +77,7 @@
w_frame = s_method.create_frame(space, w(0), [], sender=s_initial_frame).w_self()
try:
- tools.interp.loop(w_frame)
+ interp.loop(w_frame)
except interpreter.ReturnFromTopLevel, e:
assert e.object.as_string() == 'b1'
except interpreter.StackOverflow, e:
More information about the pypy-commit
mailing list