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

Function body

tests/test_streaming.py:18–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"])
17async def test_basic(sync: bool, client: Anthropic, async_client: AsyncAnthropic) -> None:
18 def body() -> Iterator[bytes]:
19 yield b"event: completion\n"
20 yield b'data: {"foo":true}\n'
21 yield b"\n"
22
23 iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client)
24

Calls

no outgoing calls

Tested by

no test coverage detected