]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-103880: Fix `assertRaises` usage in `test_genericalias` (GH-103916) (#103917)
authorNikita Sobolev <mail@sobolevn.me>
Thu, 27 Apr 2023 10:33:29 +0000 (13:33 +0300)
committerGitHub <noreply@github.com>
Thu, 27 Apr 2023 10:33:29 +0000 (16:03 +0530)
(cherry picked from commit dff8e5dc8d0758d1f9c55fdef308e44aefebe1a2)

Lib/test/test_genericalias.py

index e44193a0f72da2cc61176930ae67432394c12ea9..d8c5b8e76e07c99b05f4472372474f011e078507 100644 (file)
@@ -305,8 +305,11 @@ class BaseTest(unittest.TestCase):
 
         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):