Skip to content

Commit

Permalink
pythongh-111126: Use isinstance instead of assert[Not]IsInstance
Browse files Browse the repository at this point in the history
…in `test_typing` (python#111127)
  • Loading branch information
sobolevn authored Oct 20, 2023
1 parent f1e751e commit ea7c26e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2011,13 +2011,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
Expand Down

0 comments on commit ea7c26e

Please sign in to comment.