8000 TST: remove `TestNewBufferProtocol.test_error_too_many_dims` · rgommers/numpy@5a93cfe · GitHub
[go: up one dir, main page]

Skip to content

Commit 5a93cfe

Browse files
committed
TST: remove TestNewBufferProtocol.test_error_too_many_dims
This is failing in the tests for PyPy 3.9 wheel builds, which is blocking the production of nightlies. The test doesn't really do what it was designed for and is slow, so delete it - as suggested on numpygh-25334. Closes numpygh-25334 [skip ci]
1 parent 021787a commit 5a93cfe

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

numpy/_core/tests/test_multiarray.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8205,33 +8205,6 @@ def test_max_dims(self):
82058205
a = np.ones((1,) * 32)
82068206
self._check_roundtrip(a)
82078207

8208-
@pytest.mark.slow
8209-
def test_error_too_many_dims(self):
8210-
def make_ctype(shape, scalar_type):
8211-
t = scalar_type
8212-
for dim in shape[::-1]:
8213-
t = dim * t
8214-
return t
8215-
8216-
# Try constructing a memory with too many dimensions:
8217-
c_u8_65d = make_ctype((1,)*65, ctypes.c_uint8)
8218-
try:
8219-
m = memoryview(c_u8_65d())
8220-
except ValueError:
8221-
pytest.skip("memoryview doesn't support more dimensions")
8222-
8223-
assert_equal(m.ndim, 65)
8224-
8225-
with pytest.raises(RuntimeError, match=".*ndim"):
8226-
np.array(m)
8227-
8228-
# The above seems to create some deep cycles, clean them up for
8229-
# easier reference count debugging:
8230-
del c_u8_65d, m
8231-
for i in range(65):
8232-
if gc.collect() == 0:
8233-
break
8234-
82358208
def test_error_pointer_type(self):
82368209
# gh-6741
82378210
m = memoryview(ctypes.pointer(ctypes.c_uint8()))

0 commit comments

Comments
 (0)
0