gh-141367: Use actual SPECIALIZATION_THRESHOLD value in specialization related test (GH-141417)

This commit is contained in:
Mikhail Efimov 2025-11-11 23:16:46 +03:00 committed by GitHub
parent 336154f4b0
commit 2fb2b82161
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -349,10 +349,12 @@ def test_deopt_from_append_list(self):
# gh-132011: it used to crash, because
# of `CALL_LIST_APPEND` specialization failure.
code = textwrap.dedent("""
import _testinternalcapi
l = []
def lappend(l, x, y):
l.append((x, y))
for x in range(3):
for x in range(_testinternalcapi.SPECIALIZATION_THRESHOLD):
lappend(l, None, None)
try:
lappend(list, None, None)