Skip to content

Commit 750e504

Browse files
Use more precise exception types in assertRaises in typing tests (GH-98650)
(cherry picked from commit 45c8935) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent a86a7b8 commit 750e504

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_typing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,11 +2405,11 @@ class D(C):
24052405

24062406
self.assertEqual(D.__parameters__, ())
24072407

2408-
with self.assertRaises(Exception):
2408+
with self.assertRaises(TypeError):
24092409
D[int]
2410-
with self.assertRaises(Exception):
2410+
with self.assertRaises(TypeError):
24112411
D[Any]
2412-
with self.assertRaises(Exception):
2412+
with self.assertRaises(TypeError):
24132413
D[T]
24142414

24152415
def test_new_with_args(self):

0 commit comments

Comments
 (0)