From 45c89358b71e4638455e75ba6e60b42c511bbc2a Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Tue, 25 Oct 2022 16:33:34 +0300 Subject: Use more precise exception types in `assertRaises` in typing tests (#98650) --- Lib/test/test_typing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index ab8e717..26c3e02 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -3575,11 +3575,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): -- cgit v0.12