MCPcopy
hub / github.com/openai/openai-python / assert_empty_iter

Function assert_empty_iter

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

Source from the content-addressed store, hash-verified

229 return next(iter)
230
231
232async def assert_empty_iter(iter: Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent]) -> None:
233 with pytest.raises((StopAsyncIteration, RuntimeError)):
234 await iter_next(iter)
235
236

Calls 1

iter_nextFunction · 0.85

Tested by

no test coverage detected