[pypy-svn] r34119 - in pypy/branch/transparent-proxy/pypy/objspace/std: . test
fijal at codespeak.net
fijal at codespeak.net
Fri Nov 3 16:32:30 CET 2006
Author: fijal
Date: Fri Nov 3 16:32:27 2006
New Revision: 34119
Modified:
pypy/branch/transparent-proxy/pypy/objspace/std/test/test_proxy_object.py
pypy/branch/transparent-proxy/pypy/objspace/std/tlistobject.py
Log:
Fixed a bug and added a test.
Modified: pypy/branch/transparent-proxy/pypy/objspace/std/test/test_proxy_object.py
==============================================================================
--- pypy/branch/transparent-proxy/pypy/objspace/std/test/test_proxy_object.py (original)
+++ pypy/branch/transparent-proxy/pypy/objspace/std/test/test_proxy_object.py Fri Nov 3 16:32:27 2006
@@ -4,6 +4,20 @@
from pypy.objspace.std.test.test_proxy import AppProxyBasic
+class AppTestProxyNoDict(AppProxyBasic):
+ def setup_method(self, meth):
+ super(AppTestProxyNoDict, self).setup_method(meth)
+ self.w_A = self.space.appexec([], """():
+ class A(object):
+ __slots__ = []
+ return A
+ """)
+
+ def test_write_dict(self):
+ c = self.Controller(self.A())
+ obj = proxy(self.A, c.perform)
+ raises(AttributeError, "obj.__dict__ = {}")
+
class AppTestProxyObj(AppProxyBasic):
def setup_method(self, meth):
super(AppTestProxyObj, self).setup_method(meth)
Modified: pypy/branch/transparent-proxy/pypy/objspace/std/tlistobject.py
==============================================================================
--- pypy/branch/transparent-proxy/pypy/objspace/std/tlistobject.py (original)
+++ pypy/branch/transparent-proxy/pypy/objspace/std/tlistobject.py Fri Nov 3 16:32:27 2006
@@ -5,6 +5,7 @@
from pypy.objspace.std.objspace import *
from pypy.objspace.std.proxy_helpers import register_type
from pypy.interpreter.error import OperationError
+from pypy.interpreter import baseobjspace
#class W_Transparent(W_Object):
# def __init__(self, w_controller):
@@ -57,7 +58,7 @@
def setdict(self, space, w_dict):
if not self.setdictvalue(space, space.wrap('__dict__'), w_dict):
- W_Root.setdict(self, space, w_dict)
+ baseobjspace.W_Root.setdict(self, space, w_dict)
from pypy.objspace.std.objecttype import object_typedef as typedef
More information about the Pypy-commit
mailing list