MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _run

Method _run

tests/test_api_retry.py:61–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59class TestWithRetry(unittest.TestCase):
60 def test_success_on_first_try(self) -> None:
61 async def _run() -> None:
62 call_count = 0
63
64 async def operation(attempt: int, ctx: RetryContext) -> str:
65 nonlocal call_count
66 call_count += 1
67 return "ok"
68
69 result = await with_retry(operation, RetryOptions(max_retries=3))
70 self.assertEqual(result, "ok")
71 self.assertEqual(call_count, 1)
72
73 asyncio.run(_run())
74

Callers

nothing calls this directly

Calls 3

with_retryFunction · 0.90
RetryOptionsClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected