MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_ndarray_linked_list

Method test_ndarray_linked_list

Lib/test/test_buffer.py:1296–1310  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1294 self.assertRaises(TypeError, is_contiguous, nd, 201)
1295
1296 def test_ndarray_linked_list(self):
1297 for perm in permutations(range(5)):
1298 m = [0]*5
1299 nd = ndarray([1,2,3], shape=[3], flags=ND_VAREXPORT)
1300 m[0] = memoryview(nd)
1301
1302 for i in range(1, 5):
1303 nd.push([1,2,3], shape=[3])
1304 m[i] = memoryview(nd)
1305
1306 for i in range(5):
1307 m[perm[i]].release()
1308
1309 self.assertRaises(BufferError, nd.pop)
1310 del nd
1311
1312 def test_ndarray_format_scalar(self):
1313 # ndim = 0: scalar

Callers

nothing calls this directly

Calls 3

pushMethod · 0.45
releaseMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected