@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / e23ca3a0e8
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 11, 23:45 UTC

[CI] Re-use whisper_client for all tests (#30148)

Signed-off-by: NickLucche <nlucches@redhat.com>

Nicolò Lucchesi committed Dec 5, 2025 at 20:47 UTC e23ca3a0e8bbf8d1e386bd619e0056ec7255810c
1 file changed +13 -17
tests/entrypoints/openai/test_transcription_validation_whisper.py
+13 -17
@@ -32,24 +32,20 @@ async def whisper_client(server):
32
33
34 @pytest.mark.asyncio
35 -async def test_basic_audio(mary_had_lamb):
36 - server_args = ["--enforce-eager"]
37 -
35 +async def test_basic_audio(whisper_client, mary_had_lamb):
36 # Based on https://github.com/openai/openai-cookbook/blob/main/examples/Whisper_prompting_guide.ipynb.
39 - with RemoteOpenAIServer(MODEL_NAME, server_args) as remote_server:
40 - client = remote_server.get_async_client()
41 - transcription = await client.audio.transcriptions.create(
42 - model=MODEL_NAME,
43 - file=mary_had_lamb,
44 - language="en",
45 - response_format="text",
46 - temperature=0.0,
47 - )
48 - out = json.loads(transcription)
49 - out_text = out["text"]
50 - out_usage = out["usage"]
51 - assert "Mary had a little lamb," in out_text
52 - assert out_usage["seconds"] == 16, out_usage["seconds"]
37 + transcription = await whisper_client.audio.transcriptions.create(
38 + model=MODEL_NAME,
39 + file=mary_had_lamb,
40 + language="en",
41 + response_format="text",
42 + temperature=0.0,
43 + )
44 + out = json.loads(transcription)
45 + out_text = out["text"]
46 + out_usage = out["usage"]
47 + assert "Mary had a little lamb," in out_text
48 + assert out_usage["seconds"] == 16, out_usage["seconds"]
49
50
51 @pytest.mark.asyncio