|
11 | 11 | import warnings
|
12 | 12 | from test import support
|
13 | 13 | from test.support import (script_helper, requires_debug_ranges,
|
14 |
| - requires_specialization, C_RECURSION_LIMIT) |
| 14 | + requires_specialization, Py_C_RECURSION_LIMIT) |
15 | 15 | from test.support.os_helper import FakePath
|
16 | 16 |
|
17 | 17 | class TestSpecifics(unittest.TestCase):
|
@@ -111,7 +111,7 @@ def __getitem__(self, key):
|
111 | 111 |
|
112 | 112 | @unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")
|
113 | 113 | def test_extended_arg(self):
|
114 |
| - repeat = int(C_RECURSION_LIMIT * 0.9) |
| 114 | + repeat = int(Py_C_RECURSION_LIMIT * 0.9) |
115 | 115 | longexpr = 'x = x or ' + '-x' * repeat
|
116 | 116 | g = {}
|
117 | 117 | code = textwrap.dedent('''
|
@@ -557,12 +557,12 @@ def test_yet_more_evil_still_undecodable(self):
|
557 | 557 | @support.cpython_only
|
558 | 558 | @unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")
|
559 | 559 | def test_compiler_recursion_limit(self):
|
560 |
| - # Expected limit is C_RECURSION_LIMIT * 2 |
| 560 | + # Expected limit is Py_C_RECURSION_LIMIT * 2 |
561 | 561 | # Duplicating the limit here is a little ugly.
|
562 | 562 | # Perhaps it should be exposed somewhere...
|
563 |
| - fail_depth = C_RECURSION_LIMIT * 2 + 1 |
564 |
| - crash_depth = C_RECURSION_LIMIT * 100 |
565 |
| - success_depth = int(C_RECURSION_LIMIT * 1.8) |
| 563 | + fail_depth = Py_C_RECURSION_LIMIT * 2 + 1 |
| 564 | + crash_depth = Py_C_RECURSION_LIMIT * 100 |
| 565 | + success_depth = int(Py_C_RECURSION_LIMIT * 1.8) |
566 | 566 |
|
567 | 567 | def check_limit(prefix, repeated, mode="single"):
|
568 | 568 | expect_ok = prefix + repeated * success_depth
|
|
0 commit comments