(tempdir)
| 352 | |
| 353 | |
| 354 | def 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 | |
| 368 | def test_byte_stream_split(): |
nothing calls this directly
no test coverage detected