Make sure ReadOptions can be used.
()
| 1540 | |
| 1541 | |
| 1542 | def test_read_options(): |
| 1543 | """Make sure ReadOptions can be used.""" |
| 1544 | expected = pa.Table.from_arrays([pa.array([1, 2, 3, 4])], names=["b"]) |
| 1545 | with ConstantFlightServer() as server, \ |
| 1546 | FlightClient(('localhost', server.port)) as client: |
| 1547 | options = flight.FlightCallOptions( |
| 1548 | read_options=IpcReadOptions(included_fields=[1])) |
| 1549 | response1 = client.do_get(flight.Ticket( |
| 1550 | b'multi'), options=options).read_all() |
| 1551 | response2 = client.do_get(flight.Ticket(b'multi')).read_all() |
| 1552 | |
| 1553 | assert response2.num_columns == 2 |
| 1554 | assert response1.num_columns == 1 |
| 1555 | assert response1 == expected |
| 1556 | assert response2 == multiple_column_table() |
| 1557 | |
| 1558 | |
| 1559 | basic_auth_handler = HttpBasicServerAuthHandler(creds={ |
nothing calls this directly
no test coverage detected