MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / list

Method list

tests/lib/tools/test_session_runner.py:1713–1721  ·  view source on GitHub ↗
(self, _session_id: str, *, limit: int = 1000, extra_headers: Any = None)

Source from the content-addressed store, hash-verified

1711 class _Events(FakeAsyncEvents):
1712 @override
1713 async def list(self, _session_id: str, *, limit: int = 1000, extra_headers: Any = None) -> Any:
1714 if self.stream_calls == 1:
1715 return
1716 if terminated == "during_the_failed_read":
1717 await started.wait()
1718 yield _thread_terminated("sthr_ended")
1719 finish.set()
1720 await asyncio.sleep(0.02) # Gives the call time to end before the read fails.
1721 raise _api_status_error(500)
1722
1723 events = _Events(streams=[_DroppedStream([]), _Stream([])])
1724 tools = [_FakeTool("slow", slow), _FakeTool("echo", echo)]

Calls 5

_thread_terminatedFunction · 0.85
sleepMethod · 0.80
_api_status_errorFunction · 0.70
waitMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected