Skip to content

Commit

Permalink
pythongh-111126: Use isintance instead of assert[Not]IsInstance i…
Browse files Browse the repository at this point in the history
…n `test_typing`
  • Loading branch information
sobolevn committed Oct 20, 2023
1 parent cb1bf89 commit bc12dc5
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 bc12dc5

Please sign in to comment.