[pypy-svn] r49629 - pypy/dist/pypy/objspace/std/test

fijal at codespeak.net fijal at codespeak.net
Tue Dec 11 16:37:54 CET 2007


Author: fijal
Date: Tue Dec 11 16:37:53 2007
New Revision: 49629

Added:
   pypy/dist/pypy/objspace/std/test/test_proxy_usercreated.py   (contents, props changed)
Modified:
   pypy/dist/pypy/objspace/std/test/test_proxy_internals.py
Log:
Argh. Last checkin made little sense. Create new test and skip file test.


Modified: pypy/dist/pypy/objspace/std/test/test_proxy_internals.py
==============================================================================
--- pypy/dist/pypy/objspace/std/test/test_proxy_internals.py	(original)
+++ pypy/dist/pypy/objspace/std/test/test_proxy_internals.py	Tue Dec 11 16:37:53 2007
@@ -123,6 +123,7 @@
         assert get_tproxy_controller(lst) is f
 
     def test_proxy_file(self):
+        skip("Not working")
         from __pypy__ import tproxy
 
         def f(name, *args, **kwds):

Added: pypy/dist/pypy/objspace/std/test/test_proxy_usercreated.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/objspace/std/test/test_proxy_usercreated.py	Tue Dec 11 16:37:53 2007
@@ -0,0 +1,23 @@
+
+from pypy.interpreter.baseobjspace import W_Root, ObjSpace, Wrappable
+from pypy.objspace.std.test.test_proxy_internals import AppProxy
+from pypy.interpreter.typedef import TypeDef
+from pypy.interpreter.gateway import interp2app
+
+class W_Wrapped(Wrappable):
+    def new(space, w_type):
+        return space.wrap(W_Wrapped())
+
+W_Wrapped.typedef = TypeDef(
+    'Wrapped',
+    __new__ = interp2app(W_Wrapped.new.im_func)
+)
+
+class AppTestProxyNewtype(AppProxy):
+    def setup_class(cls):
+        AppProxy.setup_class.im_func(cls)
+        cls.w_wrapped = cls.space.wrap(W_Wrapped())
+        
+    def test_one(self):
+        x = type(self.wrapped)()
+        print x



More information about the Pypy-commit mailing list