Use more precise exception types in assertRaises in typing tests (GH-98650)

(cherry picked from commit 45c89358b7)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2022-10-25 07:19:37 -07:00 committed by GitHub
parent 4b68e34a6c
commit abc1a8c61c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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):