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

Function test_python_file_readinto

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

Source from the content-addressed store, hash-verified

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