]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix an invalid assertEqual() call in test_descr.py (GH-15318)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 26 Aug 2019 22:59:18 +0000 (15:59 -0700)
committerGitHub <noreply@github.com>
Mon, 26 Aug 2019 22:59:18 +0000 (15:59 -0700)
(cherry picked from commit 6b2e3256b6752055498f41f343fb22100845bc9d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Lib/test/test_descr.py

index 675f9748e8050076341f530e11014da987c2d01d..87304749974f57fe2305b00d1b1ce4ec798f2ea6 100644 (file)
@@ -2627,12 +2627,8 @@ order (MRO) for bases """
         self.assertEqual(Sub.test(), Base.aProp)
 
         # Verify that super() doesn't allow keyword args
-        try:
+        with self.assertRaises(TypeError):
             super(Base, kw=1)
-        except TypeError:
-            pass
-        else:
-            self.assertEqual("super shouldn't accept keyword args")
 
     def test_basic_inheritance(self):
         # Testing inheritance from basic types...