]> granicus.if.org Git - python/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 23:02:21 +0000 (16:02 -0700)
committerGitHub <noreply@github.com>
Mon, 26 Aug 2019 23:02:21 +0000 (16:02 -0700)
(cherry picked from commit 6b2e3256b6752055498f41f343fb22100845bc9d)

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

index 9998a3cc77a2232601faef15924d6f797070c9b7..0d0c1dd1acbe8f0029f86f753bc15a07a3f4cb7f 100644 (file)
@@ -2659,12 +2659,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...