[Python-checkins] Fix an invalid assertEqual() call in test_descr.py (GH-15318)

Miss Islington (bot) webhook-mailer at python.org
Mon Aug 26 18:59:25 EDT 2019


https://github.com/python/cpython/commit/31ce015db893be60ae60e963e58c902ac87f5085
commit: 31ce015db893be60ae60e963e58c902ac87f5085
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-08-26T15:59:18-07:00
summary:

Fix an invalid assertEqual() call in test_descr.py (GH-15318)

(cherry picked from commit 6b2e3256b6752055498f41f343fb22100845bc9d)

Co-authored-by: Zackery Spytz <zspytz at gmail.com>

files:
M Lib/test/test_descr.py

diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 675f9748e805..87304749974f 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -2627,12 +2627,8 @@ def test(klass):
         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...



More information about the Python-checkins mailing list