bpo-46921: Vectorcall support for super() (GH-31687)

Co-Authored-By: Dong-hee Na <donghee.na@python.org>
This commit is contained in:
Ken Jin 2022-03-06 14:21:28 +08:00 committed by GitHub
parent 2d8b764210
commit 602024e6e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 62 additions and 2 deletions

View file

@ -317,6 +317,14 @@ class TestSuper(unittest.TestCase):
for i in range(1000):
super.__init__(sp, int, i)
def test_super_argcount(self):
with self.assertRaisesRegex(TypeError, "expected at most"):
super(int, int, int)
def test_super_argtype(self):
with self.assertRaisesRegex(TypeError, "argument 1 must be a type"):
super(1, int)
if __name__ == "__main__":
unittest.main()