summaryrefslogtreecommitdiff
path: root/numpy/core/tests
diff options
context:
space:
mode:
authorQiming Sun <osirpt.sun@gmail.com>2019-09-15 18:37:13 -0700
committerQiming Sun <osirpt.sun@gmail.com>2019-09-15 18:37:13 -0700
commit06535b0cc52a699eebb89c801c1feddc9cf168ca (patch)
tree8425a24bc073d74f1358cefed2e21ca6af7929ca /numpy/core/tests
parent7cc8bfb32f8f26d47cae4b342c009ab13cfb313b (diff)
downloadnumpy-06535b0cc52a699eebb89c801c1feddc9cf168ca.tar.gz
MAINT: Update tests for _ctypes class
Diffstat (limited to 'numpy/core/tests')
-rw-r--r--numpy/core/tests/test_multiarray.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index 715ef203b..b0623bd86 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -8004,7 +8004,6 @@ class TestCTypes(object):
# but when the `ctypes_ptr` object dies, so should `arr`
del ctypes_ptr
- break_cycles()
assert_(arr_ref() is None, "unknowable whether ctypes pointer holds a reference")
def test_ctypes_as_parameter_holds_reference(self):
@@ -8021,21 +8020,8 @@ class TestCTypes(object):
# but when the `ctypes_ptr` object dies, so should `arr`
del ctypes_ptr
- break_cycles()
assert_(arr_ref() is None, "unknowable whether ctypes pointer holds a reference")
- def test_ctypes_data_as_no_circular_reference(self):
- # check array reference count based on the buffer the array points to
- data = b'\x00' * 128
- ref_count = sys.getrefcount(data)
-
- arr = np.frombuffer(data)
- ctypes_ptr = arr.ctypes.data_as(ctypes.c_void_p)
-
- del arr, ctypes_ptr
- # Do not call gc before checking circular reference
- assert_(sys.getrefcount(data) == ref_count, "Found ctypes pointer circular reference")
-
class TestWritebackIfCopy(object):
# all these tests use the WRITEBACKIFCOPY mechanism