[pypy-commit] pypy cpyext-gc-support-2: fix test

arigo pypy.commits at gmail.com
Tue Feb 16 11:52:06 EST 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: cpyext-gc-support-2
Changeset: r82286:6e6a31a1290d
Date: 2016-02-16 17:50 +0100
http://bitbucket.org/pypy/pypy/changeset/6e6a31a1290d/

Log:	fix test

diff --git a/pypy/module/cpyext/test/test_getargs.py b/pypy/module/cpyext/test/test_getargs.py
--- a/pypy/module/cpyext/test/test_getargs.py
+++ b/pypy/module/cpyext/test/test_getargs.py
@@ -161,7 +161,9 @@
                 freed.append('x')
         raises(TypeError, pybuffer,
                freestring("string"), freestring("other string"), 42)
-        import gc; gc.collect()
+        self.debug_collect()    # gc.collect() is not enough in this test:
+                                # we need to check and free the PyObject
+                                # linked to the freestring object as well
         assert freed == ['x', 'x']
 
 


More information about the pypy-commit mailing list