mirror of
https://github.com/python/cpython.git
synced 2026-01-26 21:03:34 +00:00
gh-141367: Use actual SPECIALIZATION_THRESHOLD value in specialization related test (GH-141417)
This commit is contained in:
parent
336154f4b0
commit
2fb2b82161
@ -349,10 +349,12 @@ class ListTest(list_tests.CommonTest):
|
||||
# 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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user