1 From 433324956abb028f6d993195d31e4dd8308115c3 Mon Sep 17 00:00:00 2001
2 From: Felix Yan <felixonmars@archlinux.org>
3 Date: Mon, 20 Mar 2023 22:32:03 +0800
4 Subject: [PATCH] Fix tests for typeguard 3.x (#394)
6 typeguard 3.x introduced an incompatible change to `check_type()`'s
9 Co-authored-by: Julien Danjou <julien@danjou.info>
11 .../Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml | 3 +++
12 tests/test_tenacity.py | 8 ++++----
13 2 files changed, 7 insertions(+), 4 deletions(-)
14 create mode 100644 releasenotes/notes/Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml
16 diff --git a/releasenotes/notes/Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml b/releasenotes/notes/Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml
18 index 00000000..9688c3d4
20 +++ b/releasenotes/notes/Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml
24 + - "Fixes test failures with typeguard 3.x"
25 diff --git a/tests/test_tenacity.py b/tests/test_tenacity.py
26 index 82806a69..b646e23c 100644
27 --- a/tests/test_tenacity.py
28 +++ b/tests/test_tenacity.py
29 @@ -1542,10 +1542,10 @@ def num_to_str(number):
30 with_constructor_result = with_raw(1)
32 # These raise TypeError exceptions if they fail
33 - check_type("with_raw", with_raw, typing.Callable[[int], str])
34 - check_type("with_raw_result", with_raw_result, str)
35 - check_type("with_constructor", with_constructor, typing.Callable[[int], str])
36 - check_type("with_constructor_result", with_constructor_result, str)
37 + check_type(with_raw, typing.Callable[[int], str])
38 + check_type(with_raw_result, str)
39 + check_type(with_constructor, typing.Callable[[int], str])
40 + check_type(with_constructor_result, str)