Try downloading a flight of RecordBatches in a GeneratorStream.
()
| 1399 | |
| 1400 | |
| 1401 | def test_flight_generator_stream_of_batches(): |
| 1402 | """Try downloading a flight of RecordBatches in a GeneratorStream.""" |
| 1403 | data = pa.Table.from_arrays([ |
| 1404 | pa.array(range(0, 10 * 1024)) |
| 1405 | ], names=['a']) |
| 1406 | |
| 1407 | with EchoStreamFlightServer() as server, \ |
| 1408 | FlightClient(('localhost', server.port)) as client: |
| 1409 | writer, _ = client.do_put(flight.FlightDescriptor.for_path('test'), |
| 1410 | data.schema) |
| 1411 | writer.write_table(data) |
| 1412 | writer.close() |
| 1413 | result = client.do_get(flight.Ticket(b'')).read_all() |
| 1414 | assert result.equals(data) |
| 1415 | |
| 1416 | |
| 1417 | def test_flight_generator_stream_of_batches_with_dict(): |
nothing calls this directly
no test coverage detected