MCPcopy Create free account
hub / github.com/apache/arrow / test_python_file_readinto

Function test_python_file_readinto

python/pyarrow/tests/test_io.py:207–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

205
206
207def test_python_file_readinto():
208 length = 10
209 data = b'some sample data longer than 10'
210 dst_buf = bytearray(length)
211 src_buf = BytesIO(data)
212
213 with pa.PythonFile(src_buf, mode='r') as f:
214 assert f.readinto(dst_buf) == 10
215
216 assert dst_buf[:length] == data[:length]
217 assert len(dst_buf) == length
218
219
220def test_python_file_read_buffer():

Callers

nothing calls this directly

Calls 3

lenFunction · 0.85
PythonFileMethod · 0.80
readintoMethod · 0.80

Tested by

no test coverage detected