[pypy-svn] pypy jitypes2: don't report the memory leak if we under boehm, as it's a false positive due to some __del__ not called

antocuni commits-noreply at bitbucket.org
Mon Jan 3 11:06:26 CET 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: jitypes2
Changeset: r40333:1c1e853df2e9
Date: 2010-12-30 18:07 +0100
http://bitbucket.org/pypy/pypy/changeset/1c1e853df2e9/

Log:	don't report the memory leak if we under boehm, as it's a false
	positive due to some __del__ not called

diff --git a/pypy/module/test_lib_pypy/ctypes_tests/support.py b/pypy/module/test_lib_pypy/ctypes_tests/support.py
--- a/pypy/module/test_lib_pypy/ctypes_tests/support.py
+++ b/pypy/module/test_lib_pypy/ctypes_tests/support.py
@@ -1,4 +1,5 @@
 import py
+import sys
 import ctypes
 
 py.test.importorskip("ctypes", "1.0.2")
@@ -23,6 +24,9 @@
             cls.old_num = _rawffi._num_of_allocated_objects()
     
     def teardown_class(cls):
+        if sys.pypy_translation_info['translation.gc'] == 'boehm':
+            return # it seems that boehm has problems with __del__, so not
+                   # everything is freed
         if hasattr(cls, 'old_num'):
             import gc
             for _ in range(4):


More information about the Pypy-commit mailing list