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

Function test_ops

dask/bytes/tests/test_http.py:99–111  ·  view source on GitHub ↗
(dir_server, block_size)

Source from the content-addressed store, hash-verified

97
98@pytest.mark.parametrize("block_size", [None, 99999])
99def test_ops(dir_server, block_size):
100 fn = files[0]
101 f = open_files(root + fn)[0]
102 with open(os.path.join(dir_server, fn), "rb") as expected:
103 expected = expected.read()
104 with f as f:
105 # these pass because the default
106 assert f.read(10) == expected[:10]
107 f.seek(0)
108 assert f.read(10) == expected[:10]
109 assert f.read(10) == expected[10:20]
110 f.seek(-10, 2)
111 assert f.read() == expected[-10:]
112
113
114def test_ops_blocksize(dir_server):

Callers

nothing calls this directly

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected