MCPcopy Create free account
hub / github.com/dask/dask / test_read_bytes_block

Function test_read_bytes_block

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

Source from the content-addressed store, hash-verified

318
319@pytest.mark.parametrize("blocksize", [5, 15, 45, 1500])
320def test_read_bytes_block(s3, blocksize):
321 _, vals = read_bytes(
322 f"s3://{test_bucket_name}/test/account*", blocksize=blocksize, **s3so
323 )
324 assert list(map(len, vals)) == [
325 max((len(v) // blocksize), 1) for v in files.values()
326 ]
327
328 results = compute(*concat(vals))
329 assert sum(len(r) for r in results) == sum(len(v) for v in files.values())
330
331 ourlines = b"".join(results).split(b"\n")
332 testlines = b"".join(files.values()).split(b"\n")
333 assert set(ourlines) == set(testlines)
334
335
336@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