Author: Armin Rigo <[email protected]>
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')
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to