diff --git a/python/pyarrow/tests/test_flight.py b/python/pyarrow/tests/test_flight.py index 7f89c115324..2c53e4f63f2 100644 --- a/python/pyarrow/tests/test_flight.py +++ b/python/pyarrow/tests/test_flight.py @@ -56,7 +56,15 @@ def __exit__(self, exc_type, exc_value, traceback): pass flight = None - FlightClient, FlightServerBase = context_like, context_like + class MockContextManager: + def __enter__(self): + return self + def __exit__(self, exc_type, exc_val, exc_tb): + pass + class FlightServerBase(MockContextManager): + pass + class FlightClient(MockContextManager): + pass ServerAuthHandler, ClientAuthHandler = object, object ServerMiddleware, ServerMiddlewareFactory = object, object ClientMiddleware, ClientMiddlewareFactory = object, object