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

Method test_ndarray_format_shape

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

Source from the content-addressed store, hash-verified

1320 lst=scalar)
1321
1322 def test_ndarray_format_shape(self):
1323 # ndim = 1, shape = [n]
1324 nitems = randrange(1, 10)
1325 for fmt, items, _ in iter_format(nitems):
1326 itemsize = struct.calcsize(fmt)
1327 for flags in (0, ND_PIL):
1328 nd = ndarray(items, shape=[nitems], format=fmt, flags=flags)
1329 self.verify(nd, obj=None,
1330 itemsize=itemsize, fmt=fmt, readonly=True,
1331 ndim=1, shape=(nitems,), strides=(itemsize,),
1332 lst=items)
1333
1334 def test_ndarray_format_strides(self):
1335 # ndim = 1, strides

Callers

nothing calls this directly

Calls 2

verifyMethod · 0.95
iter_formatFunction · 0.85

Tested by

no test coverage detected