From cdff06d77fd6c8e565e82e613d89eb63d2879af4 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Fri, 30 Aug 2024 14:37:30 +0200 Subject: [PATCH] fmt --- tests/test_errors.py | 48 ++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/tests/test_errors.py b/tests/test_errors.py index 70cd24a6d..1dfcfaf26 100644 --- a/tests/test_errors.py +++ b/tests/test_errors.py @@ -43,26 +43,34 @@ def make_private_link_response() -> requests.Response: # This should be `(int, str, type)` but doesn't work in Python 3.7-3.8. -base_subclass_test_cases: List[Tuple[int, str, type]] = [ - (400, '', errors.BadRequest), (400, 'INVALID_PARAMETER_VALUE', errors.BadRequest), - (400, 'INVALID_PARAMETER_VALUE', errors.InvalidParameterValue), - (400, 'REQUEST_LIMIT_EXCEEDED', errors.TooManyRequests), (400, '', IOError), - (401, '', errors.Unauthenticated), (401, '', IOError), (403, '', errors.PermissionDenied), - (403, '', IOError), (404, '', errors.NotFound), (404, '', IOError), (409, '', errors.ResourceConflict), - (409, 'ABORTED', errors.Aborted), (409, 'ABORTED', errors.ResourceConflict), - (409, 'ALREADY_EXISTS', errors.AlreadyExists), (409, 'ALREADY_EXISTS', errors.ResourceConflict), - (409, '', IOError), (429, '', errors.TooManyRequests), - (429, 'REQUEST_LIMIT_EXCEEDED', errors.TooManyRequests), - (429, 'REQUEST_LIMIT_EXCEEDED', errors.RequestLimitExceeded), - (429, 'RESOURCE_EXHAUSTED', errors.TooManyRequests), - (429, 'RESOURCE_EXHAUSTED', errors.ResourceExhausted), (429, '', IOError), (499, '', errors.Cancelled), - (499, '', IOError), (500, '', errors.InternalError), (500, 'UNKNOWN', errors.InternalError), - (500, 'UNKNOWN', errors.Unknown), (500, 'DATA_LOSS', errors.InternalError), - (500, 'DATA_LOSS', errors.DataLoss), (500, '', IOError), (501, '', errors.NotImplemented), - (501, '', IOError), (503, '', errors.TemporarilyUnavailable), (503, '', IOError), - (504, '', errors.DeadlineExceeded), (504, '', IOError), (444, '', errors.DatabricksError), - (444, '', IOError), -] +base_subclass_test_cases: List[Tuple[int, str, + type]] = [(400, '', errors.BadRequest), + (400, 'INVALID_PARAMETER_VALUE', errors.BadRequest), + (400, 'INVALID_PARAMETER_VALUE', errors.InvalidParameterValue), + (400, 'REQUEST_LIMIT_EXCEEDED', errors.TooManyRequests), + (400, '', IOError), (401, '', errors.Unauthenticated), + (401, '', IOError), (403, '', errors.PermissionDenied), + (403, '', IOError), (404, '', errors.NotFound), + (404, '', IOError), (409, '', errors.ResourceConflict), + (409, 'ABORTED', errors.Aborted), + (409, 'ABORTED', errors.ResourceConflict), + (409, 'ALREADY_EXISTS', errors.AlreadyExists), + (409, 'ALREADY_EXISTS', errors.ResourceConflict), + (409, '', IOError), (429, '', errors.TooManyRequests), + (429, 'REQUEST_LIMIT_EXCEEDED', errors.TooManyRequests), + (429, 'REQUEST_LIMIT_EXCEEDED', errors.RequestLimitExceeded), + (429, 'RESOURCE_EXHAUSTED', errors.TooManyRequests), + (429, 'RESOURCE_EXHAUSTED', errors.ResourceExhausted), + (429, '', IOError), (499, '', errors.Cancelled), + (499, '', IOError), (500, '', errors.InternalError), + (500, 'UNKNOWN', errors.InternalError), + (500, 'UNKNOWN', errors.Unknown), + (500, 'DATA_LOSS', errors.InternalError), + (500, 'DATA_LOSS', errors.DataLoss), (500, '', IOError), + (501, '', errors.NotImplemented), (501, '', IOError), + (503, '', errors.TemporarilyUnavailable), (503, '', IOError), + (504, '', errors.DeadlineExceeded), (504, '', IOError), + (444, '', errors.DatabricksError), (444, '', IOError), ] subclass_test_cases = [(fake_valid_response('GET', x[0], x[1], 'nope'), x[2], 'nope') for x in base_subclass_test_cases]