Commit 2e1066dc authored by Stefan Behnel's avatar Stefan Behnel

Try to work around differing GC behaviour of NumPy 1.14 in a doctest.

parent 88821f1a
...@@ -414,13 +414,13 @@ def test_coerce_to_numpy(): ...@@ -414,13 +414,13 @@ def test_coerce_to_numpy():
@testcase_numpy_1_5 @testcase_numpy_1_5
def test_memslice_getbuffer(): def test_memslice_getbuffer():
""" """
>>> print(test_memslice_getbuffer()); gc_collect_if_required() >>> test_memslice_getbuffer(); gc_collect_if_required()
[[ 0 2 4] [[ 0 2 4]
[10 12 14]] [10 12 14]]
callback called callback called
""" """
cdef int[:, :] array = create_array((4, 5), mode="c", use_callback=True) cdef int[:, :] array = create_array((4, 5), mode="c", use_callback=True)
return np.asarray(array)[::2, ::2] print(np.asarray(array)[::2, ::2])
cdef class DeallocateMe(object): cdef class DeallocateMe(object):
def __dealloc__(self): def __dealloc__(self):
......
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