Author: Matti Picus <[email protected]>
Branch: cpyext-debug-type_dealloc
Changeset: r92047:a12c2162e44e
Date: 2017-08-03 12:18 +0300
http://bitbucket.org/pypy/pypy/changeset/a12c2162e44e/

Log:    minimal failing test; __init__ causes leak-checker to fail

diff --git a/pypy/module/cpyext/test/test_typeobject.py 
b/pypy/module/cpyext/test/test_typeobject.py
--- a/pypy/module/cpyext/test/test_typeobject.py
+++ b/pypy/module/cpyext/test/test_typeobject.py
@@ -569,6 +569,20 @@
             ])
         assert module.test_type(type(None))
 
+    def test_leaking(self):
+        module = self.import_extension('foo', [
+            ("test_leak", "METH_VARARGS",
+             '''
+                 Py_RETURN_TRUE;
+             '''
+             )
+            ])
+        class C:
+            def __init__(self):
+                pass
+        # leak checker should not report errors
+        assert module.test_leak(C())
+    
     def test_tp_getattro(self):
         module = self.import_extension('foo', [
             ("test_tp_getattro", "METH_VARARGS",
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to