lidavidm commented on a change in pull request #10893:
URL: https://github.com/apache/arrow/pull/10893#discussion_r686058418
##########
File path: python/pyarrow/tests/test_flight.py
##########
@@ -1545,6 +1573,33 @@ def test_roundtrip_errors():
with pytest.raises(flight.FlightInternalError, match=".*foo.*"):
list(client.list_flights())
+ data = [pa.array([-10, -5, 0, 5, 10])]
+ table = pa.Table.from_arrays(data, names=['a'])
+
+ exceptions = {
+ 'internal': flight.FlightInternalError,
+ 'timedout':flight.FlightTimedOutError,
+ 'cancel':flight.FlightCancelledError,
+ 'unauthenticated':flight.FlightUnauthenticatedError,
+ 'unauthorized':flight.FlightUnauthorizedError,
+ 'after_read_internal':flight.FlightInternalError,
+ 'after_read_timedout':flight.FlightTimedOutError,
+ 'after_read_cancel':flight.FlightCancelledError,
+ 'after_read_unauthenticated':flight.FlightUnauthenticatedError,
+ 'after_read_unauthorized':flight.FlightUnauthorizedError,
+
+ }
+
+ for command, exception in exceptions.items():
+
+ with pytest.raises(exception, match=".*foo.*"):
Review comment:
Actually I see what you mean now. Yes, consolidating the two cases
should work if you'd like to do that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]