(sync: bool, client: Anthropic, async_client: AsyncAnthropic)
| 62 | @pytest.mark.asyncio |
| 63 | @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) |
| 64 | async def test_event_missing_data(sync: bool, client: Anthropic, async_client: AsyncAnthropic) -> None: |
| 65 | def body() -> Iterator[bytes]: |
| 66 | yield b"event: ping\n" |
| 67 | yield b"\n" |
| 68 | |
| 69 | iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client) |
| 70 | |
| 71 | sse = await iter_next(iterator) |
| 72 | assert sse.event == "ping" |
| 73 | assert sse.data == "" |
| 74 | |
| 75 | await assert_empty_iter(iterator) |
| 76 | |
| 77 | |
| 78 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected