mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-141367: Use actual SPECIALIZATION_THRESHOLD value in specialization related test (GH-141417)
This commit is contained in:
parent
336154f4b0
commit
2fb2b82161
1 changed files with 3 additions and 1 deletions
|
|
@ -349,10 +349,12 @@ def test_deopt_from_append_list(self):
|
||||||
# gh-132011: it used to crash, because
|
# gh-132011: it used to crash, because
|
||||||
# of `CALL_LIST_APPEND` specialization failure.
|
# of `CALL_LIST_APPEND` specialization failure.
|
||||||
code = textwrap.dedent("""
|
code = textwrap.dedent("""
|
||||||
|
import _testinternalcapi
|
||||||
|
|
||||||
l = []
|
l = []
|
||||||
def lappend(l, x, y):
|
def lappend(l, x, y):
|
||||||
l.append((x, y))
|
l.append((x, y))
|
||||||
for x in range(3):
|
for x in range(_testinternalcapi.SPECIALIZATION_THRESHOLD):
|
||||||
lappend(l, None, None)
|
lappend(l, None, None)
|
||||||
try:
|
try:
|
||||||
lappend(list, None, None)
|
lappend(list, None, None)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue