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

Function test_read_bytes

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

Source from the content-addressed store, hash-verified

253
254
255def test_read_bytes(s3, s3so):
256 sample, values = read_bytes("s3://" + test_bucket_name + "/test/accounts.*", **s3so)
257 assert isinstance(sample, bytes)
258 assert sample[:5] == files[sorted(files)[0]][:5]
259 assert sample.endswith(b"\n")
260
261 assert isinstance(values, (list, tuple))
262 assert isinstance(values[0], (list, tuple))
263 assert hasattr(values[0][0], "dask")
264
265 assert sum(map(len, values)) >= len(files)
266 results = compute(*concat(values))
267 assert set(results) == set(files.values())
268
269
270def test_read_bytes_sample_delimiter(s3, s3so):

Callers

nothing calls this directly

Calls 6

read_bytesFunction · 0.90
computeFunction · 0.90
setClass · 0.85
sumFunction · 0.50
concatFunction · 0.50
valuesMethod · 0.45

Tested by

no test coverage detected