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

Function test_memory_output_stream

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

Source from the content-addressed store, hash-verified

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