(stream_fixture)
| 403 | |
| 404 | |
| 405 | def test_stream_simple_roundtrip(stream_fixture): |
| 406 | batches = stream_fixture.write_batches() |
| 407 | file_contents = pa.BufferReader(stream_fixture.get_source()) |
| 408 | reader = pa.ipc.open_stream(file_contents) |
| 409 | |
| 410 | assert reader.schema.equals(batches[0].schema) |
| 411 | |
| 412 | total = 0 |
| 413 | for i, next_batch in enumerate(reader): |
| 414 | assert next_batch.equals(batches[i]) |
| 415 | total += 1 |
| 416 | |
| 417 | assert total == len(batches) |
| 418 | |
| 419 | with pytest.raises(StopIteration): |
| 420 | reader.read_next_batch() |
| 421 | |
| 422 | |
| 423 | @pytest.mark.zstd |
nothing calls this directly
no test coverage detected