[Python-checkins] [3.11] gh-103880: Fix `assertRaises` usage in `test_genericalias` (GH-103916) (#103917)
kumaraditya303
webhook-mailer at python.org
Thu Apr 27 06:33:36 EDT 2023
https://github.com/python/cpython/commit/7f70f1c5cc964f64a89b3536b1bc96c3ecb6cb24
commit: 7f70f1c5cc964f64a89b3536b1bc96c3ecb6cb24
branch: 3.11
author: Nikita Sobolev <mail at sobolevn.me>
committer: kumaraditya303 <59607654+kumaraditya303 at users.noreply.github.com>
date: 2023-04-27T16:03:29+05:30
summary:
[3.11] gh-103880: Fix `assertRaises` usage in `test_genericalias` (GH-103916) (#103917)
(cherry picked from commit dff8e5dc8d0758d1f9c55fdef308e44aefebe1a2)
files:
M Lib/test/test_genericalias.py
diff --git a/Lib/test/test_genericalias.py b/Lib/test/test_genericalias.py
index e44193a0f72d..d8c5b8e76e07 100644
--- a/Lib/test/test_genericalias.py
+++ b/Lib/test/test_genericalias.py
@@ -305,8 +305,11 @@ def test_parameter_chaining(self):
with self.assertRaises(TypeError):
list[int][int]
+ with self.assertRaises(TypeError):
dict[T, int][str, int]
+ with self.assertRaises(TypeError):
dict[str, T][str, int]
+ with self.assertRaises(TypeError):
dict[T, T][str, int]
def test_equality(self):
More information about the Python-checkins
mailing list