style: wrap the escaped messages under 120 columns

This commit is contained in:
ryan-crabbe-berri 2026-08-21 17:48:57 -07:00
parent 91599aef69
commit 6b088f4bb1
2 changed files with 12 additions and 3 deletions

View file

@ -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",

View file

@ -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,