[pypy-svn] r41880 - pypy/dist/pypy/translator/js/test

fijal at codespeak.net fijal at codespeak.net
Wed Apr 4 09:29:24 CEST 2007


Author: fijal
Date: Wed Apr  4 09:29:22 2007
New Revision: 41880

Modified:
   pypy/dist/pypy/translator/js/test/runtest.py
   pypy/dist/pypy/translator/js/test/test_class.py
   pypy/dist/pypy/translator/js/test/test_rlist.py
Log:
Few fixes regarding new way of displaying objects.


Modified: pypy/dist/pypy/translator/js/test/runtest.py
==============================================================================
--- pypy/dist/pypy/translator/js/test/runtest.py	(original)
+++ pypy/dist/pypy/translator/js/test/runtest.py	Wed Apr  4 09:29:22 2007
@@ -199,10 +199,10 @@
         return tuple(t)
 
     def class_name(self, value):
-        return value[:-10].split('_')[-1]
+        return value[:-8].split('.')[-1]
 
     def is_of_instance_type(self, val):
-        m = re.match("^<.* instance>$", val)
+        m = re.match("^<.* object>$", val)
         return bool(m)
 
     def read_attr(self, obj, name):

Modified: pypy/dist/pypy/translator/js/test/test_class.py
==============================================================================
--- pypy/dist/pypy/translator/js/test/test_class.py	(original)
+++ pypy/dist/pypy/translator/js/test/test_class.py	Wed Apr  4 09:29:22 2007
@@ -136,11 +136,11 @@
         return str(C())
     
     fn = compile_function(instance_str, [])
-    assert fn() == '<pypy_translator_js_test_test_class_C instance>'
+    assert fn() == '<pypy.translator.js.test.test_class.C object>'
 
 def test_instance_ret():
     def instance_ret():
         return str(C())
     
     fn = compile_function(instance_ret, [])
-    assert fn() == '<pypy_translator_js_test_test_class_C instance>'
+    assert fn() == '<pypy.translator.js.test.test_class.C object>'

Modified: pypy/dist/pypy/translator/js/test/test_rlist.py
==============================================================================
--- pypy/dist/pypy/translator/js/test/test_rlist.py	(original)
+++ pypy/dist/pypy/translator/js/test/test_rlist.py	Wed Apr  4 09:29:22 2007
@@ -79,5 +79,5 @@
             x = l2.pop()
             return str(x)+";"+str(l)
         res = self.ll_to_string(self.interpret(fn, []))
-        res = res.replace('pypy_translator_js_test_test_rlist_', '')
-        assert res == '<Foo instance>;[<Foo instance>, <Bar instance>, <Bar instance>, <Foo instance>, <Foo instance>]'
+        res = res.replace('pypy.translator.js.test.test_rlist.', '')
+        assert res == '<Foo object>;[<Foo object>, <Bar object>, <Bar object>, <Foo object>, <Foo object>]'



More information about the Pypy-commit mailing list