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

arigo noreply at buildbot.pypy.org
Mon Nov 28 18:20:52 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: stm
Changeset: r49924:bdf32e433c10
Date: 2011-11-28 18:18 +0100
http://bitbucket.org/pypy/pypy/changeset/bdf32e433c10/

Log:	Fix the test.

diff --git a/pypy/translator/stm/test/test_rstm.py b/pypy/translator/stm/test/test_rstm.py
--- a/pypy/translator/stm/test/test_rstm.py
+++ b/pypy/translator/stm/test/test_rstm.py
@@ -3,6 +3,7 @@
 from pypy.translator.stm.rstm import *
 from pypy.rpython.annlowlevel import llhelper
 from pypy.rlib.rarithmetic import r_longlong, r_singlefloat
+from pypy.rlib.debug import debug_print
 
 
 A = lltype.Struct('A', ('x', lltype.Signed), ('y', lltype.Signed),
@@ -178,17 +179,17 @@
     def test_compiled_stm_getfield(self):
         def entry_point(argv):
             test_stm_getfield()
-            print 'ok!'
+            debug_print('ok!')
             return 0
         t, cbuilder = self.compile(entry_point)
-        data = cbuilder.cmdexec('')
-        assert data == 'ok!\n'
+        _, data = cbuilder.cmdexec('', err=True)
+        assert data.endswith('ok!\n')
 
     def test_compiled_stm_setfield(self):
         def entry_point(argv):
             test_stm_setfield()
-            print 'ok!'
+            debug_print('ok!')
             return 0
         t, cbuilder = self.compile(entry_point)
-        data = cbuilder.cmdexec('')
-        assert data == 'ok!\n'
+        _, data = cbuilder.cmdexec('', err=True)
+        assert data.endswith('ok!\n')


More information about the pypy-commit mailing list