From 222989c7e1404e477f598e7a59c6a6312a443d22 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Fri, 20 Oct 2023 21:03:32 +0300 Subject: [PATCH] gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` (GH-111127) (cherry picked from commit ea7c26e4b89c71234c4a603567a93f0a44c9cc97) Co-authored-by: Nikita Sobolev --- Lib/test/test_typing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 177155a6365662..fa279b557de2c6 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -1944,13 +1944,13 @@ def test_callable_instance_type_error(self): 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