Skip to content

Commit ea7c26e

Browse files
authored
gh-111126: Use isinstance instead of assert[Not]IsInstance in test_typing (#111127)
1 parent f1e751e commit ea7c26e

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)