Author: Philip Jenvey <[email protected]>
Branch: py3.5
Changeset: r89595:c7ca4451d1a3
Date: 2017-01-15 11:28 -0800
http://bitbucket.org/pypy/pypy/changeset/c7ca4451d1a3/
Log: restore our xfail, adapt is_resource_enabled
diff --git a/lib-python/3/ctypes/test/__init__.py
b/lib-python/3/ctypes/test/__init__.py
--- a/lib-python/3/ctypes/test/__init__.py
+++ b/lib-python/3/ctypes/test/__init__.py
@@ -12,3 +12,16 @@
def load_tests(*args):
return support.load_package_tests(os.path.dirname(__file__), *args)
+
+def xfail(method):
+ """
+ Poor's man xfail: remove it when all the failures have been fixed
+ """
+ def new_method(self, *args, **kwds):
+ try:
+ method(self, *args, **kwds)
+ except:
+ pass
+ else:
+ self.assertTrue(False, "DID NOT RAISE")
+ return new_method
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
@@ -9,8 +9,10 @@
################################################################
-if is_resource_enabled("refcount"):
+try:
from sys import getrefcount as grc
+except ImportError:
+ grc = None
if sys.version_info > (2, 4):
c_py_ssize_t = c_size_t
else:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit