[pypy-commit] pypy py3.3: Fix lib-python test: getrefcount is not available on PyPy.

mjacob noreply at buildbot.pypy.org
Tue Feb 24 12:46:12 CET 2015


Author: Manuel Jacob <me at manueljacob.de>
Branch: py3.3
Changeset: r76095:14e2febbcc2c
Date: 2015-02-24 12:45 +0100
http://bitbucket.org/pypy/pypy/changeset/14e2febbcc2c/

Log:	Fix lib-python test: getrefcount is not available on PyPy.

diff --git a/lib-python/3/ctypes/test/test_python_api.py b/lib-python/3/ctypes/test/test_python_api.py
--- a/lib-python/3/ctypes/test/test_python_api.py
+++ b/lib-python/3/ctypes/test/test_python_api.py
@@ -10,7 +10,8 @@
 
 ################################################################
 
-from sys import getrefcount as grc
+if is_resource_enabled("refcount"):
+    from sys import getrefcount as grc
 if sys.version_info > (2, 4):
     c_py_ssize_t = c_size_t
 else:


More information about the pypy-commit mailing list