(
predicate: Callable[[], Awaitable[bool]],
*,
timeout: float = 30.0,
message: str,
)
| 30 | |
| 31 | |
| 32 | async 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 | |
| 46 | class TestRpcEventLog: |
no test coverage detected
searching dependent graphs…