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

Function test_read_bytes_block

dask/bytes/tests/test_local.py:150–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148
149
150def test_read_bytes_block():
151 with filetexts(files, mode="b"):
152 for bs in [5, 15, 45, 1500]:
153 sample, vals = read_bytes(".test.account*", blocksize=bs)
154 assert list(map(len, vals)) == [
155 max((len(v) // bs), 1) for v in files.values()
156 ]
157
158 results = compute(*concat(vals))
159 assert sum(len(r) for r in results) == sum(len(v) for v in files.values())
160
161 ourlines = b"".join(results).split(b"\n")
162 testlines = b"".join(files.values()).split(b"\n")
163 assert set(ourlines) == set(testlines)
164
165
166def test_read_bytes_delimited():

Callers

nothing calls this directly

Calls 10

filetextsFunction · 0.90
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…