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:935–949  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

933
934@pytest.mark.pandas
935def test_ipc_file_stream_has_eos():
936 # ARROW-5395
937 df = pd.DataFrame({'foo': [1.5]})
938 batch = pa.RecordBatch.from_pandas(df)
939 sink = pa.BufferOutputStream()
940 write_file(batch, sink)
941 buffer = sink.getvalue()
942
943 # skip the file magic
944 reader = pa.ipc.open_stream(buffer[8:])
945
946 # will fail if encounters footer data instead of eos
947 rdf = reader.read_pandas()
948
949 assert_frame_equal(df, rdf)
950
951
952@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