diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-10-25 14:19:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-25 14:19:37 (GMT) |
commit | abc1a8c61c82860e135b1b1fcb01713f8b911cd8 (patch) | |
tree | f3ceedbcdbc93ddd906b65d86ff6ca8e0a9041bd | |
parent | 4b68e34a6c483582000cea69db526ff266abf61c (diff) | |
download | cpython-abc1a8c61c82860e135b1b1fcb01713f8b911cd8.zip cpython-abc1a8c61c82860e135b1b1fcb01713f8b911cd8.tar.gz cpython-abc1a8c61c82860e135b1b1fcb01713f8b911cd8.tar.bz2 |
Use more precise exception types in `assertRaises` in typing tests (GH-98650)
(cherry picked from commit 45c89358b71e4638455e75ba6e60b42c511bbc2a)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
-rw-r--r-- | Lib/test/test_typing.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 298e374..b368042 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -3560,11 +3560,11 @@ class GenericTests(BaseTestCase): self.assertEqual(D.__parameters__, ()) - with self.assertRaises(Exception): + with self.assertRaises(TypeError): D[int] - with self.assertRaises(Exception): + with self.assertRaises(TypeError): D[Any] - with self.assertRaises(Exception): + with self.assertRaises(TypeError): D[T] def test_new_with_args(self): |