]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` ...
authorNikita Sobolev <mail@sobolevn.me>
Fri, 20 Oct 2023 18:03:32 +0000 (21:03 +0300)
committerGitHub <noreply@github.com>
Fri, 20 Oct 2023 18:03:32 +0000 (18:03 +0000)
Lib/test/test_typing.py

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