(sync: bool, client: OpenAI, async_client: AsyncOpenAI)
| 45 | @pytest.mark.asyncio |
| 46 | @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) |
| 47 | async def test_event_missing_data(sync: bool, client: OpenAI, async_client: AsyncOpenAI) -> None: |
| 48 | def body() -> Iterator[bytes]: |
| 49 | yield b"event: ping\n" |
| 50 | yield b"\n" |
| 51 | |
| 52 | iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client) |
| 53 | |
| 54 | sse = await iter_next(iterator) |
| 55 | assert sse.event == "ping" |
| 56 | assert sse.data == "" |
| 57 | |
| 58 | await assert_empty_iter(iterator) |
| 59 | |
| 60 | |
| 61 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected