Skip to content

Commit

Permalink
Fix tests for typeguard 3.x (#394)
Browse files Browse the repository at this point in the history
typeguard 3.x introduced an incompatible change to `check_type()`'s
signature.

Co-authored-by: Julien Danjou <julien@danjou.info>
  • Loading branch information
felixonmars and jd committed Mar 20, 2023
1 parent 2a09589 commit 4333249
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
fixes:
- "Fixes test failures with typeguard 3.x"
8 changes: 4 additions & 4 deletions tests/test_tenacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -1542,10 +1542,10 @@ def num_to_str(number):
with_constructor_result = with_raw(1)

# These raise TypeError exceptions if they fail
check_type("with_raw", with_raw, typing.Callable[[int], str])
check_type("with_raw_result", with_raw_result, str)
check_type("with_constructor", with_constructor, typing.Callable[[int], str])
check_type("with_constructor_result", with_constructor_result, str)
check_type(with_raw, typing.Callable[[int], str])
check_type(with_raw_result, str)
check_type(with_constructor, typing.Callable[[int], str])
check_type(with_constructor_result, str)


@contextmanager
Expand Down

0 comments on commit 4333249

Please sign in to comment.