bpo-36974: inherit tp_vectorcall_offset unconditionally (GH-13858) (GH-14342)
(cherry picked from commit a8b27e623d75377aabe50df27e97cab4e81a174a)
Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
diff --git a/Lib/test/test_call.py b/Lib/test/test_call.py
index b4ab749..b252ca1 100644
--- a/Lib/test/test_call.py
+++ b/Lib/test/test_call.py
@@ -577,9 +577,18 @@
def __call__(self, n):
return 'new'
+ class SuperBase:
+ def __call__(self, *args):
+ return super().__call__(*args)
+
+ class MethodDescriptorSuper(SuperBase, _testcapi.MethodDescriptorBase):
+ def __call__(self, *args):
+ return super().__call__(*args)
+
calls += [
(MethodDescriptorHeap(), (0,), {}, True),
(MethodDescriptorOverridden(), (0,), {}, 'new'),
+ (MethodDescriptorSuper(), (0,), {}, True),
]
for (func, args, kwargs, expected) in calls: