MCPcopy
hub / github.com/dask/dask / test_read_bytes_block

Function test_read_bytes_block

dask/bytes/tests/test_s3.py:326–339  ·  view source on GitHub ↗
(s3, blocksize, s3so)

Source from the content-addressed store, hash-verified

324
325@pytest.mark.parametrize("blocksize", [5, 15, 45, 1500])
326def test_read_bytes_block(s3, blocksize, s3so):
327 _, vals = read_bytes(
328 f"s3://{test_bucket_name}/test/account*", blocksize=blocksize, **s3so
329 )
330 assert list(map(len, vals)) == [
331 max((len(v) // blocksize), 1) for v in files.values()
332 ]
333
334 results = compute(*concat(vals))
335 assert sum(len(r) for r in results) == sum(len(v) for v in files.values())
336
337 ourlines = b"".join(results).split(b"\n")
338 testlines = b"".join(files.values()).split(b"\n")
339 assert set(ourlines) == set(testlines)
340
341
342@pytest.mark.parametrize("blocksize", [5, 15, 45, 1500])

Callers

nothing calls this directly

Calls 9

read_bytesFunction · 0.90
computeFunction · 0.90
maxFunction · 0.85
setClass · 0.85
splitMethod · 0.80
concatFunction · 0.50
sumFunction · 0.50
valuesMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…