Skip to content

Commit

Permalink
Make it more obvious that the attempts are capped
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Aug 19, 2024
1 parent c795fcd commit 24a7b8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import stamina
stamina.set_testing(True) # no backoff, 1 attempt
stamina.set_testing(True, attempts=2) # no backoff, 2 attempts

for attempt in stamina.retry_context(on=ValueError):
for attempt in stamina.retry_context(on=ValueError, attempts=1_000):
with attempt:
print("trying", attempt.num)
raise ValueError("nope")
Expand Down

0 comments on commit 24a7b8d

Please sign in to comment.