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