[Zope3-checkins] CVS: Zope3/src/zope/proxy/tests - test_proxy.py:1.8

Steve Alexander steve@cat-box.net
Sat, 10 May 2003 05:24:29 -0400


Update of /cvs-repository/Zope3/src/zope/proxy/tests
In directory cvs.zope.org:/tmp/cvs-serv18919/src/zope/proxy/tests

Modified Files:
	test_proxy.py 
Log Message:
Removed test_leak method, as the leak is now fixed in Python CVS.
(Thanks Jeremy!)
Altered comment in test_subclass_constructor accordingly.


=== Zope3/src/zope/proxy/tests/test_proxy.py 1.7 => 1.8 ===
--- Zope3/src/zope/proxy/tests/test_proxy.py:1.7	Fri May  9 10:02:56 2003
+++ Zope3/src/zope/proxy/tests/test_proxy.py	Sat May 10 05:24:28 2003
@@ -73,36 +73,10 @@
         self.assertRaises(TypeError, self.proxy_class, o, key='value')
         self.assertRaises(TypeError, self.proxy_class, key='value')
 
-    def test_leak(self):
-        # XXX Leaky. This is the same leak as in test_subclass_constructor,
-        #     but isolated to depend only on code in Python 2.2.2.
-        #     It still leaks on the release22-maint branch, but not with
-        #     Python 2.3 from CVS HEAD.
-        class SomeClass(object):
-            def somemethod():
-                # XXX The next line produces the following leak:
-                #
-                # totalrefcount=233207   change=32
-                # <type 'tuple'>                3       12
-                # <type 'type'>                 1        7
-                # <type 'dict'>                 1        5
-                # <type 'staticmethod'>         1        4
-                # <type 'function'>             1        4
-                # <type 'getset_descriptor'>    1        4
-                # <type 'member_descriptor'>    1        4
-                # <type 'cell'>                 1        4
-                # <type 'weakref'>              1        4
-                # <type 'str'>                  0       10
-                # <type 'class'>                0        1
-                # <type 'code'>                 0        1
-
-                super(SomeClass, None)
-            somemethod = staticmethod(somemethod)
-        SomeClass.somemethod()
-
     def test_subclass_constructor(self):
         # NB This leaks due to a bug in Python 2.2.2.
-        #    See test_leak, above.
+        #    The leak is fixed in the release22-maint branch in Python CVS
+        #    (and this in Python 2.2.3), and in Python 2.3.
         class MyProxy(self.proxy_class):
             def __new__(cls, *args, **kwds):
                 return super(MyProxy, cls).__new__(cls, *args, **kwds)