MCPcopy
hub / github.com/anthropics/anthropic-sdk-python / assert_empty_iter

Function assert_empty_iter

tests/test_streaming.py:261–263  ·  view source on GitHub ↗
(iter: Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent])

Source from the content-addressed store, hash-verified

259 return next(iter)
260
261
262async def assert_empty_iter(iter: Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent]) -> None:
263 with pytest.raises((StopAsyncIteration, RuntimeError)):
264 await iter_next(iter)
265
266

Calls 1

iter_nextFunction · 0.70

Tested by

no test coverage detected