MCPcopy Create free account
hub / github.com/github/copilot-sdk / _wait_for

Function _wait_for

python/e2e/test_rpc_event_log_e2e.py:32–43  ·  view source on GitHub ↗
(
    predicate: Callable[[], Awaitable[bool]],
    *,
    timeout: float = 30.0,
    message: str,
)

Source from the content-addressed store, hash-verified

30
31
32async def _wait_for(
33 predicate: Callable[[], Awaitable[bool]],
34 *,
35 timeout: float = 30.0,
36 message: str,
37) -> None:
38 deadline = time.monotonic() + timeout
39 while time.monotonic() < deadline:
40 if await predicate():
41 return
42 await asyncio.sleep(0.2)
43 pytest.fail(message)
44
45
46class TestRpcEventLog:

Calls 2

predicateFunction · 0.85
failMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…