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

Function test_parquet_read_from_buffer

python/pyarrow/tests/parquet/test_basic.py:354–365  ·  view source on GitHub ↗
(tempdir)

Source from the content-addressed store, hash-verified

352
353
354def test_parquet_read_from_buffer(tempdir):
355 # reading from a buffer from python's open()
356 table = pa.table({"a": [1, 2, 3]})
357 pq.write_table(table, str(tempdir / "data.parquet"))
358
359 with open(str(tempdir / "data.parquet"), "rb") as f:
360 result = pq.read_table(f)
361 assert result.equals(table)
362
363 with open(str(tempdir / "data.parquet"), "rb") as f:
364 result = pq.read_table(pa.PythonFile(f))
365 assert result.equals(table)
366
367
368def test_byte_stream_split():

Callers

nothing calls this directly

Calls 4

equalsMethod · 0.80
PythonFileMethod · 0.80
write_tableMethod · 0.45
read_tableMethod · 0.45

Tested by

no test coverage detected