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

Function test_ipc_file_stream_has_eos

python/pyarrow/tests/test_ipc.py:959–973  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

957
958@pytest.mark.pandas
959def test_ipc_file_stream_has_eos():
960 # ARROW-5395
961 df = pd.DataFrame({'foo': [1.5]})
962 batch = pa.RecordBatch.from_pandas(df)
963 sink = pa.BufferOutputStream()
964 write_file(batch, sink)
965 buffer = sink.getvalue()
966
967 # skip the file magic
968 reader = pa.ipc.open_stream(buffer[8:])
969
970 # will fail if encounters footer data instead of eos
971 rdf = reader.read_pandas()
972
973 assert_frame_equal(df, rdf)
974
975
976@pytest.mark.pandas

Callers

nothing calls this directly

Calls 3

write_fileFunction · 0.85
BufferOutputStreamMethod · 0.80
read_pandasMethod · 0.45

Tested by

no test coverage detected