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

Function test_memory_output_stream

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

Source from the content-addressed store, hash-verified

969
970
971def test_memory_output_stream():
972 # 10 bytes
973 val = b'dataabcdef'
974 f = pa.BufferOutputStream()
975
976 K = 1000
977 for i in range(K):
978 f.write(val)
979
980 buf = f.getvalue()
981 assert len(buf) == len(val) * K
982 assert buf.to_pybytes() == val * K
983
984
985def test_inmemory_write_after_closed():

Callers

nothing calls this directly

Calls 3

lenFunction · 0.85
BufferOutputStreamMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected