Author: Wim Lavrijsen <[email protected]>
Branch: reflex-support
Changeset: r66701:1937fb02a285
Date: 2013-08-30 12:07 -0700
http://bitbucket.org/pypy/pypy/changeset/1937fb02a285/
Log: rejig test initialization so as to not confuse the leak checker
diff --git a/pypy/module/cppyy/test/test_cint.py
b/pypy/module/cppyy/test/test_cint.py
--- a/pypy/module/cppyy/test/test_cint.py
+++ b/pypy/module/cppyy/test/test_cint.py
@@ -7,6 +7,10 @@
if capi.identify() != 'CINT':
py.test.skip("backend-specific: CINT-only tests")
+# load _cffi_backend early, or its global vars are counted as leaks in the
+# test (note that the module is not otherwise used in the test itself)
+from pypy.module._cffi_backend import newtype
+
currpath = py.path.local(__file__).dirpath()
iotypes_dct = str(currpath.join("iotypesDict.so"))
@@ -139,7 +143,7 @@
class AppTestCINTTTREE:
- spaceconfig = dict(usemodules=['cppyy', '_rawffi', '_ffi', 'itertools',
'_cffi_backend'])
+ spaceconfig = dict(usemodules=['cppyy', '_rawffi', '_ffi', 'itertools'])
def setup_class(cls):
cls.w_N = cls.space.wrap(5)
@@ -148,8 +152,7 @@
cls.w_tname = cls.space.wrap("test")
cls.w_title = cls.space.wrap("test tree")
cls.w_iotypes = cls.space.appexec([], """():
- import cppyy, _cffi_backend
- _cffi_backend.new_primitive_type # prevents leak-checking
complaints on _cffi_backend
+ import cppyy
return cppyy.load_reflection_info(%r)""" % (iotypes_dct,))
def test01_write_stdvector(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit