mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 00:56:31 +08:00
ARROW-5395: Python test case
This commit is contained in:
1 parent
9e83053d0b
commit
350177829a
1 file changed
+17
@@ -475,6 +475,23 @@ def test_socket_read_all(socket_fixture):
|
||||
# ----------------------------------------------------------------------
|
||||
# Miscellaneous IPC tests
|
||||
|
||||
def test_ipc_file_stream_has_eos():
|
||||
# ARROW-5395
|
||||
|
||||
df = pd.DataFrame({'foo': [1.5]})
|
||||
batch = pa.RecordBatch.from_pandas(df)
|
||||
sink = pa.BufferOutputStream()
|
||||
write_file(batch, sink)
|
||||
buffer = sink.getvalue()
|
||||
|
||||
# skip the file magic
|
||||
reader = pa.ipc.open_stream(buffer[8:])
|
||||
|
||||
# will fail if encounters footer data instead of eos
|
||||
rdf = reader.read_pandas()
|
||||
|
||||
assert_frame_equal(df, rdf)
|
||||
|
||||
|
||||
def test_ipc_zero_copy_numpy():
|
||||
df = pd.DataFrame({'foo': [1.5]})
|
||||
|
||||
Reference in new issue
Block a user