summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-10-25 14:19:37 (GMT)
committerGitHub <noreply@github.com>2022-10-25 14:19:37 (GMT)
commitabc1a8c61c82860e135b1b1fcb01713f8b911cd8 (patch)
treef3ceedbcdbc93ddd906b65d86ff6ca8e0a9041bd
parent4b68e34a6c483582000cea69db526ff266abf61c (diff)
downloadcpython-abc1a8c61c82860e135b1b1fcb01713f8b911cd8.zip
cpython-abc1a8c61c82860e135b1b1fcb01713f8b911cd8.tar.gz
cpython-abc1a8c61c82860e135b1b1fcb01713f8b911cd8.tar.bz2
Use more precise exception types in `assertRaises` in typing tests (GH-98650)
(cherry picked from commit 45c89358b71e4638455e75ba6e60b42c511bbc2a) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
-rw-r--r--Lib/test/test_typing.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index 298e374..b368042 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -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):