(stream_fixture)
| 427 | |
| 428 | |
| 429 | def test_stream_simple_roundtrip(stream_fixture): |
| 430 | batches = stream_fixture.write_batches() |
| 431 | file_contents = pa.BufferReader(stream_fixture.get_source()) |
| 432 | reader = pa.ipc.open_stream(file_contents) |
| 433 | |
| 434 | assert reader.schema.equals(batches[0].schema) |
| 435 | |
| 436 | total = 0 |
| 437 | for i, next_batch in enumerate(reader): |
| 438 | assert next_batch.equals(batches[i]) |
| 439 | total += 1 |
| 440 | |
| 441 | assert total == len(batches) |
| 442 | |
| 443 | with pytest.raises(StopIteration): |
| 444 | reader.read_next_batch() |
| 445 | |
| 446 | |
| 447 | @pytest.mark.zstd |
nothing calls this directly
no test coverage detected