From 6b088f4bb1ebdec8e3604a9d509426ff424dd903 Mon Sep 17 00:00:00 2001 From: ryan-crabbe-berri Date: Fri, 21 Aug 2026 17:48:57 -0700 Subject: [PATCH] style: wrap the escaped messages under 120 columns --- tests/local_testing/test_embedding.py | 10 ++++++++-- .../vertex_ai/files/test_vertex_ai_files_handler.py | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/local_testing/test_embedding.py b/tests/local_testing/test_embedding.py index 677f8b10cca..fbbe83ada30 100644 --- a/tests/local_testing/test_embedding.py +++ b/tests/local_testing/test_embedding.py @@ -537,13 +537,19 @@ def test_demo_tokens_as_input_to_embeddings_fails_for_titan(): with pytest.raises( litellm.BadRequestError, - match=re.escape('litellm.BadRequestError: BedrockException - {"message":"Malformed input request: expected type: String, found: JSONArray, please reformat your input and try again."}'), + match=re.escape( + 'litellm.BadRequestError: BedrockException - {"message":"Malformed input request: ' + 'expected type: String, found: JSONArray, please reformat your input and try again."}' + ), ): litellm.embedding(model="amazon.titan-embed-text-v1", input=[[1]]) with pytest.raises( litellm.BadRequestError, - match=re.escape('litellm.BadRequestError: BedrockException - {"message":"Malformed input request: expected type: String, found: Integer, please reformat your input and try again."}'), + match=re.escape( + 'litellm.BadRequestError: BedrockException - {"message":"Malformed input request: ' + 'expected type: String, found: Integer, please reformat your input and try again."}' + ), ): litellm.embedding( model="amazon.titan-embed-text-v1", diff --git a/tests/test_litellm/llms/vertex_ai/files/test_vertex_ai_files_handler.py b/tests/test_litellm/llms/vertex_ai/files/test_vertex_ai_files_handler.py index cf52a5a856d..0a44f0a9a74 100644 --- a/tests/test_litellm/llms/vertex_ai/files/test_vertex_ai_files_handler.py +++ b/tests/test_litellm/llms/vertex_ai/files/test_vertex_ai_files_handler.py @@ -181,7 +181,10 @@ class TestVertexAIFilesHandler: # Should raise ValueError for failed download with pytest.raises( ValueError, - match=re.escape("Failed to download file from GCS: gs://test-bucket/litellm-vertex-files/uploads/abc-test-file.txt"), + match=re.escape( + "Failed to download file from GCS: " + "gs://test-bucket/litellm-vertex-files/uploads/abc-test-file.txt" + ), ): await self.handler.afile_content( file_content_request=file_content_request,