test(anthropic): fix PT012 lint violation in upstream-error regression test

This commit is contained in:
nuernber 2026-08-31 09:11:51 -07:00
parent b2df72f980
commit e1fece511a

View file

@ -501,10 +501,14 @@ async def test_async_sse_wrapper_reraises_upstream_error_to_connected_client():
)
received = []
with pytest.raises(_ProviderStreamError) as excinfo:
async def _drain():
async for chunk in iterator.async_sse_wrapper(_failing_stream()):
received.append(chunk)
with pytest.raises(_ProviderStreamError) as excinfo:
await _drain()
assert excinfo.value.status_code == 529
assert received
assert not any(c.startswith(b"event: error\n") for c in received)