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

Function test_memory_output_stream

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

Source from the content-addressed store, hash-verified

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