gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` (#111127)

This commit is contained in:
Nikita Sobolev 2023-10-20 21:03:32 +03:00 committed by GitHub
parent f1e751e933
commit ea7c26e4b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -2011,13 +2011,13 @@ class BaseCallableTests:
def f(): def f():
pass pass
with self.assertRaises(TypeError): with self.assertRaises(TypeError):
self.assertIsInstance(f, Callable[[], None]) isinstance(f, Callable[[], None])
with self.assertRaises(TypeError): with self.assertRaises(TypeError):
self.assertIsInstance(f, Callable[[], Any]) isinstance(f, Callable[[], Any])
with self.assertRaises(TypeError): with self.assertRaises(TypeError):
self.assertNotIsInstance(None, Callable[[], None]) isinstance(None, Callable[[], None])
with self.assertRaises(TypeError): with self.assertRaises(TypeError):
self.assertNotIsInstance(None, Callable[[], Any]) isinstance(None, Callable[[], Any])
def test_repr(self): def test_repr(self):
Callable = self.Callable Callable = self.Callable