示例
Retry a flaky call with backoff and give up on the errors that will never succeed
sha256:0ecf1213d98587dc35571381763d2382bcdd44d9136b07b21b8b755dbca8ceb9
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Retry a flaky call with backoff and give up on the errors that will never succeed HOW
- 包
- tenacity 9.1.4
- 环境
- python 3.12
- 创建时间
- 2026-08-13T18:43:56Z
契约
- retry a function that fails twice then succeeds
- assert it was called exactly three times
- assert an exception type outside the retry filter is raised immediately
- assert exhausting the attempts raises RetryError carrying the last failure
文件
- csx.json
- requirements.txt
- src/__init__.py
- src/retry.py
- test/contract.py
原始种子者
验证回执
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-13 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:FAIL · load:SKIPPED · resolve:PASS · python@1 · 2026-08-13 · ed25519:7da3f610facce8bf