Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9addf2c

Browse files
[3.11] gh-111126: Use isinstance instead of assert[Not]IsInstance in test_typing (GH-111127) (#111131)
gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` (GH-111127) (cherry picked from commit ea7c26e) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 7213fc2 commit 9addf2c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_typing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,13 +1944,13 @@ def test_callable_instance_type_error(self):
19441944
def f():
19451945
pass
19461946
with self.assertRaises(TypeError):
1947-
self.assertIsInstance(f, Callable[[], None])
1947+
isinstance(f, Callable[[], None])
19481948
with self.assertRaises(TypeError):
1949-
self.assertIsInstance(f, Callable[[], Any])
1949+
isinstance(f, Callable[[], Any])
19501950
with self.assertRaises(TypeError):
1951-
self.assertNotIsInstance(None, Callable[[], None])
1951+
isinstance(None, Callable[[], None])
19521952
with self.assertRaises(TypeError):
1953-
self.assertNotIsInstance(None, Callable[[], Any])
1953+
isinstance(None, Callable[[], Any])
19541954

19551955
def test_repr(self):
19561956
Callable = self.Callable

0 commit comments

Comments
 (0)