mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
bpo-46921: Vectorcall support for super()
(GH-31687)
Co-Authored-By: Dong-hee Na <donghee.na@python.org>
This commit is contained in:
parent
2d8b764210
commit
602024e6e1
3 changed files with 62 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue