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

Skip to content

Commit 4a10260

Browse files
[3.12] gh-111126: Use isinstance instead of assert[Not]IsInstance in test_typing (GH-111127) (#111130)
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 dfc8d7a commit 4a10260

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
@@ -2011,13 +2011,13 @@ def test_callable_instance_type_error(self):
20112011
def f():
20122012
pass
20132013
with self.assertRaises(TypeError):
2014-
self.assertIsInstance(f, Callable[[], None])
2014+
isinstance(f, Callable[[], None])
20152015
with self.assertRaises(TypeError):
2016-
self.assertIsInstance(f, Callable[[], Any])
2016+
isinstance(f, Callable[[], Any])
20172017
with self.assertRaises(TypeError):
2018-
self.assertNotIsInstance(None, Callable[[], None])
2018+
isinstance(None, Callable[[], None])
20192019
with self.assertRaises(TypeError):
2020-
self.assertNotIsInstance(None, Callable[[], Any])
2020+
isinstance(None, Callable[[], Any])
20212021

20222022
def test_repr(self):
20232023
Callable = self.Callable

0 commit comments

Comments
 (0)