MCPcopy Index your code
hub / github.com/python/cpython / test_ndarray_linked_list

Method test_ndarray_linked_list

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

Source from the content-addressed store, hash-verified

1306 self.assertRaises(TypeError, is_contiguous, nd, 201)
1307
1308 def test_ndarray_linked_list(self):
1309 for perm in permutations(range(5)):
1310 m = [0]*5
1311 nd = ndarray([1,2,3], shape=[3], flags=ND_VAREXPORT)
1312 m[0] = memoryview(nd)
1313
1314 for i in range(1, 5):
1315 nd.push([1,2,3], shape=[3])
1316 m[i] = memoryview(nd)
1317
1318 for i in range(5):
1319 m[perm[i]].release()
1320
1321 self.assertRaises(BufferError, nd.pop)
1322 del nd
1323
1324 def test_ndarray_format_scalar(self):
1325 # 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