]> granicus.if.org Git - python/commitdiff
Fix an invalid assertEqual() call in test_descr.py (GH-15318)
authorZackery Spytz <zspytz@gmail.com>
Mon, 26 Aug 2019 22:41:11 +0000 (16:41 -0600)
committerPablo Galindo <Pablogsal@gmail.com>
Mon, 26 Aug 2019 22:41:11 +0000 (23:41 +0100)
Lib/test/test_descr.py

index 0b43549efb838c8546b8303c0310914f1fb80ea8..770e0c496e2891398db452b4d95113f95584a32b 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...