Skip to content

Commit 2fb2b82

Browse files
pythongh-141367: Use actual SPECIALIZATION_THRESHOLD value in specialization related test (pythonGH-141417)
1 parent 336154f commit 2fb2b82

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_list.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,12 @@ def test_deopt_from_append_list(self):
349349
# gh-132011: it used to crash, because
350350
# of `CALL_LIST_APPEND` specialization failure.
351351
code = textwrap.dedent("""
352+
import _testinternalcapi
353+
352354
l = []
353355
def lappend(l, x, y):
354356
l.append((x, y))
355-
for x in range(3):
357+
for x in range(_testinternalcapi.SPECIALIZATION_THRESHOLD):
356358
lappend(l, None, None)
357359
try:
358360
lappend(list, None, None)

0 commit comments

Comments
 (0)