diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-10-20 18:27:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-20 18:27:35 (GMT) |
commit | 4a1026077af65b308c98cdfe181b5f94c46fb48a (patch) | |
tree | 5c25d1f59f52501b13f03608edf0c027f1661b46 /Lib | |
parent | dfc8d7ac935e09f85b01e3f946d5aa525a3ea696 (diff) | |
download | cpython-4a1026077af65b308c98cdfe181b5f94c46fb48a.zip cpython-4a1026077af65b308c98cdfe181b5f94c46fb48a.tar.gz cpython-4a1026077af65b308c98cdfe181b5f94c46fb48a.tar.bz2 |
[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 ea7c26e4b89c71234c4a603567a93f0a44c9cc97)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_typing.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 957d7af..dc5ab7d 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 |