[pypy-svn] r34598 - in pypy/dist/pypy/objspace/std: . test

fijal at codespeak.net fijal at codespeak.net
Tue Nov 14 15:16:24 CET 2006


Author: fijal
Date: Tue Nov 14 15:16:22 2006
New Revision: 34598

Modified:
   pypy/dist/pypy/objspace/std/proxy_helpers.py
   pypy/dist/pypy/objspace/std/test/test_proxy.py
Log:
Fixed mm resolution and test for that.


Modified: pypy/dist/pypy/objspace/std/proxy_helpers.py
==============================================================================
--- pypy/dist/pypy/objspace/std/proxy_helpers.py	(original)
+++ pypy/dist/pypy/objspace/std/proxy_helpers.py	Tue Nov 14 15:16:22 2006
@@ -14,8 +14,10 @@
         s += "list_"
     s += mm.name + "__"
     s += "_".join([classname] + ["ANY"] * (mm.arity - 1))
-    if '__' + mm.name + '__' in mm.specialnames:
-        return s, '__' + mm.name + '__'
+    #if '__' + mm.name + '__' in mm.specialnames:
+    #    return s, '__' + mm.name + '__'
+    if mm.specialnames:
+        return s, mm.specialnames[0]
     return s, mm.name
 
 def install_general_args_trampoline(type_, mm, is_local, op_name):

Modified: pypy/dist/pypy/objspace/std/test/test_proxy.py
==============================================================================
--- pypy/dist/pypy/objspace/std/test/test_proxy.py	(original)
+++ pypy/dist/pypy/objspace/std/test/test_proxy.py	Tue Nov 14 15:16:22 2006
@@ -82,6 +82,12 @@
             pass
         else:
             fail("Accessing outside a list didn't raise")
+    
+    def test_list_inplace_add(self):
+        c = self.Controller([1,2,3])
+        lst = self.proxy(list, c.perform)
+        lst += [1,2,3]
+        assert len(lst) == 6
 
 class AppTestDictProxy(AppProxyBasic):
     def test_dict(self):



More information about the Pypy-commit mailing list