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:12:59 -07:00 committed by GitHub
parent a86a7b827b
commit 750e504800
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2405,11 +2405,11 @@ class D(C):
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):