mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
test: satisfy pytest raises lint rule
This commit is contained in:
parent
d64971888b
commit
bf37cd221a
1 changed files with 6 additions and 1 deletions
|
|
@ -10709,11 +10709,16 @@ async def test_anthropic_messages_double_failure_holds_back_fallback_lifecycle_f
|
|||
response=primary_stream,
|
||||
initial_kwargs={"model": "primary"},
|
||||
)
|
||||
|
||||
collected = []
|
||||
with pytest.raises(litellm.APIError) as exc_info:
|
||||
|
||||
async def collect_chunks():
|
||||
async for chunk in wrapped:
|
||||
collected.append(chunk)
|
||||
|
||||
with pytest.raises(litellm.APIError) as exc_info:
|
||||
await collect_chunks()
|
||||
|
||||
assert collected == []
|
||||
assert exc_info.value is fallback_error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue