From beee329b269a740d79e8f82a129ff04995d770fd Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Sun, 15 Mar 2026 17:58:00 -0700 Subject: [PATCH] Fix flaky test_gemini_image_generation_async by removing non-deterministic content assertion Co-Authored-By: Claude Opus 4.6 --- tests/llm_translation/test_gemini.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/llm_translation/test_gemini.py b/tests/llm_translation/test_gemini.py index 85130837ce..b10a7d699c 100644 --- a/tests/llm_translation/test_gemini.py +++ b/tests/llm_translation/test_gemini.py @@ -838,7 +838,7 @@ async def test_gemini_image_generation_async(): IMAGE_URL = response.choices[0].message.images[0]["image_url"] print("IMAGE_URL: ", IMAGE_URL) - assert CONTENT is not None, "CONTENT is not None" + # content may be None when the model returns only an image with no text assert IMAGE_URL is not None, "IMAGE_URL is not None" assert IMAGE_URL["url"] is not None, "IMAGE_URL['url'] is not None" assert IMAGE_URL["url"].startswith("data:image/png;base64,")