Skip to content

Commit

Permalink
Add typing test
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Aug 18, 2024
1 parent daa62e5 commit 214165a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/typing/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
BoundRetryingCaller,
RetryingCaller,
is_active,
is_testing,
retry,
retry_context,
set_active,
set_testing,
)
from stamina.instrumentation import (
RetryDetails,
Expand Down Expand Up @@ -94,6 +96,14 @@ def exc_tune_waiting_timedelta() -> None: ...

set_active(False)

set_testing(True)
set_testing(True, attempts=2)

if is_testing() is False:
...

set_testing(False)


def hook(details: RetryDetails) -> None:
return None
Expand Down

0 comments on commit 214165a

Please sign in to comment.