From: Nikita Sobolev Date: Fri, 20 Oct 2023 18:03:32 +0000 (+0300) Subject: gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` ... X-Git-Tag: v3.13.0a2~384 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea7c26e4b89c71234c4a603567a93f0a44c9cc97;p=thirdparty%2FPython%2Fcpython.git gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` (#111127) --- diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 1a1e0a259fd0..7f60bf4bbc1e 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -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