Commit e1602d9b authored by Stefan Behnel's avatar Stefan Behnel

Always run garbage collection explicitly in PyPy for the GC-related NumPy tests.

parent 5704109b
......@@ -17,6 +17,10 @@ include "../buffers/mockbuffers.pxi"
ctypedef np.int32_t dtype_t
IS_PYPY = hasattr(sys, 'pypy_version_info')
NUMPY_VERSION = tuple(int(v) for v in np.__version__.split('.')[:2])
print(NUMPY_VERSION)
def get_array():
# We need to type our array to get a __pyx_get_buffer() that typechecks
# for np.ndarray and calls __getbuffer__ in numpy.pxd
......@@ -39,15 +43,13 @@ def testcase(f):
return f
def testcase_numpy_1_5(f):
major, minor, *rest = np.__version__.split('.')
if (int(major), int(minor)) >= (1, 5):
if NUMPY_VERSION >= (1, 5) or IS_PYPY:
__test__[f.__name__] = f.__doc__
return f
def gc_collect_if_required():
major, minor, *rest = np.__version__.split('.')
if (int(major), int(minor)) >= (1, 14):
if NUMPY_VERSION >= (1, 14) or IS_PYPY:
import gc
gc.collect()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment