MCPcopy Create free account
hub / github.com/alibaba/open-code-review / SmokeClient

Class SmokeClient

acp/testdata/python-client-smoke.py:111–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110
111class SmokeClient:
112 def __init__(self):
113 self.updates = []
114 self.ready = asyncio.Event()
115 self.commands_ready = asyncio.Event()
116
117 def on_connect(self, conn):
118 pass
119
120 async def session_update(self, session_id, update, **kwargs):
121 obj = update.model_dump(mode="json", by_alias=True, exclude_none=True)
122 self.updates.append(obj)
123 if obj["sessionUpdate"] == "available_commands_update":
124 self.commands_ready.set()
125 if obj["sessionUpdate"] == "tool_call_update" and "READY" in obj.get("title", ""):
126 self.ready.set()
127
128
129def assert_execution(updates, status, expected_lines):

Callers 1

smokeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected