[pypy-svn] r41604 - pypy/dist/pypy/rpython/test

fijal at codespeak.net fijal at codespeak.net
Thu Mar 29 10:35:15 CEST 2007


Author: fijal
Date: Thu Mar 29 10:35:13 2007
New Revision: 41604

Modified:
   pypy/dist/pypy/rpython/test/test_rstr.py
Log:
Make this tests pass on both lltypesystem and ootypesystem. Note that
str printing is now different at those two (or shall we make them identical
in ootype, without address??)


Modified: pypy/dist/pypy/rpython/test/test_rstr.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rstr.py	(original)
+++ pypy/dist/pypy/rpython/test/test_rstr.py	Thu Mar 29 10:35:13 2007
@@ -445,11 +445,13 @@
 
         res = self.ll_to_string(self.interpret(dummy, [1]))
         assert res.startswith('<')
-        assert res.endswith('C object>')
+        assert res.find('C object') != -1
+        assert res.endswith('>')
 
         res = self.ll_to_string(self.interpret(dummy, [0]))
         assert res.startswith('<')
-        assert res.endswith('D object>')
+        assert res.find('D object') != -1
+        assert res.endswith('>')
 
     def test_percentformat_instance(self):
         class C:
@@ -468,11 +470,13 @@
 
         res = self.ll_to_string(self.interpret(dummy, [1]))
         res = res.replace('pypy.rpython.test.test_rstr.', '')
-        assert res == 'what a nice <C object>, much nicer than <D object>'
+        assert res.find('what a nice <C object') != -1
+        assert res.find('>, much nicer than <D object') != -1
 
         res = self.ll_to_string(self.interpret(dummy, [0]))
         res = res.replace('pypy.rpython.test.test_rstr.', '')        
-        assert res == 'what a nice <D object>, much nicer than <C object>'
+        assert res.find('what a nice <D object') != -1
+        assert res.find('>, much nicer than <C object') != -1
 
     def test_percentformat_tuple(self):
         for t, expected in [((),        "<<<()>>>"),



More information about the Pypy-commit mailing list