mirror of
https://github.com/python/cpython.git
synced 2025-08-09 11:29:45 +00:00
[3.12] gh-111126: Use isinstance
instead of assert[Not]IsInstance
in test_typing
(GH-111127) (#111130)
gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` (GH-111127)
(cherry picked from commit ea7c26e4b8
)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
parent
dfc8d7ac93
commit
4a1026077a
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue