From 750e5048009e36e7c3ca9f396fc82cbcfaf8bd5e Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 25 Oct 2022 07:12:59 -0700 Subject: Use more precise exception types in `assertRaises` in typing tests (GH-98650) (cherry picked from commit 45c89358b71e4638455e75ba6e60b42c511bbc2a) Co-authored-by: Nikita Sobolev --- 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 3f38e30..34f9444 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -2405,11 +2405,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