mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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:
parent
4b68e34a6c
commit
abc1a8c61c
1 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue