]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-141367: Use actual SPECIALIZATION_THRESHOLD value in specialization related test...
authorMikhail Efimov <efimov.mikhail@gmail.com>
Tue, 11 Nov 2025 20:16:46 +0000 (23:16 +0300)
committerGitHub <noreply@github.com>
Tue, 11 Nov 2025 20:16:46 +0000 (20:16 +0000)
Lib/test/test_list.py

index 223f34fb696a6eb817bb550866068c7fd546515f..642b54d34849dabb4c19ddec5b82935ca2cb5822 100644 (file)
@@ -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)