summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2018-04-24 22:31:11 -0700
committerEric Wieser <wieser.eric@gmail.com>2018-04-25 01:14:39 -0700
commita0d21d961ae77fa2bea8dea1be6b831b105b165f (patch)
tree0be60fee2d30925ba7ac1f8d86b4ef0c1516c593 /numpy/core
parentd7d5cb3feccc1fc6cf57159e8b9fe0a733968706 (diff)
downloadnumpy-a0d21d961ae77fa2bea8dea1be6b831b105b165f.tar.gz
MAINT: Remove workaround for gh-10891
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/tests/test_multiarray.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index 00dfa6ada..3c5f90cfc 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -6522,20 +6522,16 @@ class TestNewBufferProtocol(object):
a = np.empty((1,) * 32)
self._check_roundtrip(a)
- def _make_ctype(shape, scalar_type):
- t = scalar_type
- for dim in shape[::-1]:
- t = dim * t
- return t
-
- # This creates deeply nested reference cycles that cause
- # np.lib.tests.test_io.test_load_refcount to erroneously fail (gh-10891).
- # Not making it a local ensure that the GC doesn't touch it during the tests
- c_u8_33d = _make_ctype((1,)*33, ctypes.c_uint8)
-
def test_error_too_many_dims(self):
+ def make_ctype(shape, scalar_type):
+ t = scalar_type
+ for dim in shape[::-1]:
+ t = dim * t
+ return t
+
# construct a memoryview with 33 dimensions
- m = memoryview(self.c_u8_33d())
+ c_u8_33d = make_ctype((1,)*33, ctypes.c_uint8)
+ m = memoryview(c_u8_33d())
assert_equal(m.ndim, 33)
assert_raises_regex(