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

Method test_ndarray_format_shape

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

Source from the content-addressed store, hash-verified

1332 lst=scalar)
1333
1334 def test_ndarray_format_shape(self):
1335 # ndim = 1, shape = [n]
1336 nitems = randrange(1, 10)
1337 for fmt, items, _ in iter_format(nitems):
1338 itemsize = struct.calcsize(fmt)
1339 for flags in (0, ND_PIL):
1340 nd = ndarray(items, shape=[nitems], format=fmt, flags=flags)
1341 self.verify(nd, obj=None,
1342 itemsize=itemsize, fmt=fmt, readonly=True,
1343 ndim=1, shape=(nitems,), strides=(itemsize,),
1344 lst=items)
1345
1346 def test_ndarray_format_strides(self):
1347 # ndim = 1, strides

Callers

nothing calls this directly

Calls 2

verifyMethod · 0.95
iter_formatFunction · 0.85

Tested by

no test coverage detected