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

Function test_stream_simple_roundtrip

python/pyarrow/tests/test_ipc.py:429–444  ·  view source on GitHub ↗
(stream_fixture)

Source from the content-addressed store, hash-verified

427
428
429def 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

Callers

nothing calls this directly

Calls 5

lenFunction · 0.85
write_batchesMethod · 0.80
BufferReaderMethod · 0.80
get_sourceMethod · 0.80
equalsMethod · 0.80

Tested by

no test coverage detected