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

Function test_loc

dask/bytes/tests/test_http.py:71–84  ·  view source on GitHub ↗
(dir_server)

Source from the content-addressed store, hash-verified

69
70
71def test_loc(dir_server):
72 fn = files[0]
73 f = open_files(root + fn)[0]
74 with open(os.path.join(dir_server, fn), "rb") as expected:
75 expected = expected.read()
76 with f as f:
77 data = f.read(2)
78 assert data == expected[:2]
79 assert f.loc == 2
80 f.seek(0)
81 data = f.read(3)
82 assert data == expected[:3]
83 f.seek(1, 1)
84 assert f.loc == 4
85
86
87def test_fetch_range_with_headers(dir_server):

Callers

nothing calls this directly

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected