Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dac1da2

Browse filesBrowse files
authored
GH-111798: skip test_super_deep() from test_call under pydebug builds on WASI (GH-114010)
1 parent 3aa4b83 commit dac1da2
Copy full SHA for dac1da2

File tree

Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed

‎Lib/test/test_call.py

Copy file name to clipboardExpand all lines: Lib/test/test_call.py
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import unittest
2-
from test.support import cpython_only, requires_limited_api, skip_on_s390x
2+
from test.support import (cpython_only, is_wasi, requires_limited_api, Py_DEBUG,
3+
set_recursion_limit, skip_on_s390x)
34
try:
45
import _testcapi
56
except ImportError:
@@ -990,6 +991,7 @@ def case_change_over_substitution(BLuch=None, Luch = None, fluch = None):
990991
class TestRecursion(unittest.TestCase):
991992

992993
@skip_on_s390x
994+
@unittest.skipIf(is_wasi and Py_DEBUG, "requires deep stack")
993995
def test_super_deep(self):
994996

995997
def recurse(n):
@@ -1010,9 +1012,7 @@ def c_py_recurse(m):
10101012
if m:
10111013
_testcapi.pyobject_vectorcall(py_recurse, (1000, m), ())
10121014

1013-
depth = sys.getrecursionlimit()
1014-
sys.setrecursionlimit(100_000)
1015-
try:
1015+
with set_recursion_limit(100_000):
10161016
recurse(90_000)
10171017
with self.assertRaises(RecursionError):
10181018
recurse(101_000)
@@ -1022,8 +1022,6 @@ def c_py_recurse(m):
10221022
c_py_recurse(90)
10231023
with self.assertRaises(RecursionError):
10241024
c_py_recurse(100_000)
1025-
finally:
1026-
sys.setrecursionlimit(depth)
10271025

10281026

10291027
class TestFunctionWithManyArgs(unittest.TestCase):
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Disable ``test_super_deep()`` from ``test_call`` under pydebug builds on
2+
WASI; the stack depth is too small to make the test useful.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.