Spaces:
Runtime error
Runtime error
File size: 578 Bytes
732b14f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | """Coverage for cache_hit_out wiring on throttled LLM calls."""
from __future__ import annotations
import pytest
from app.llm.llm_throttle import make_cache_hit_slot, throttled_llm_call
@pytest.mark.asyncio
async def test_throttled_llm_call_reads_cache_hit_out() -> None:
slot = make_cache_hit_slot()
async def _call() -> str:
slot[0] = True
return "ok"
result = await throttled_llm_call(
phase="test",
section_id=None,
cache_hit_out=slot,
call=_call,
)
assert result == "ok"
assert slot[0] is True
|