From 149f2435a5b71c96d1bdf3d87e696daf1a793ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Lucchesi?= Date: Mon, 14 Jul 2025 22:08:36 +0200 Subject: [PATCH] [Misc] Relax translations tests (#20856) Signed-off-by: NickLucche --- tests/entrypoints/openai/test_translation_validation.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/entrypoints/openai/test_translation_validation.py b/tests/entrypoints/openai/test_translation_validation.py index 0c2cb367f3304..79e769e3a1aa4 100644 --- a/tests/entrypoints/openai/test_translation_validation.py +++ b/tests/entrypoints/openai/test_translation_validation.py @@ -39,8 +39,8 @@ async def test_basic_audio(foscolo): # TODO remove once language detection is implemented extra_body=dict(language="it"), temperature=0.0) - out = json.loads(translation)['text'].strip() - assert "Nor will I ever touch the sacred" in out + out = json.loads(translation)['text'].strip().lower() + assert "greek sea" in out @pytest.mark.asyncio @@ -168,5 +168,4 @@ async def test_long_audio_request(foscolo): response_format="text", temperature=0.0) out = json.loads(translation)['text'].strip().lower() - # TODO investigate higher model uncertainty in for longer translations. - assert out.count("nor will i ever") == 2 + assert out.count("greek sea") == 2