|
18 | 18 | _testinternalcapi = None |
19 | 19 |
|
20 | 20 | from test import support |
21 | | -from test.support import os_helper, script_helper |
| 21 | +from test.support import os_helper, script_helper, skip_emscripten_stack_overflow |
22 | 22 | from test.support.ast_helper import ASTTestMixin |
23 | 23 | from test.test_ast.utils import to_tuple |
24 | 24 | from test.test_ast.snippets import ( |
@@ -745,6 +745,7 @@ def next(self): |
745 | 745 | enum._test_simple_enum(_Precedence, ast._Precedence) |
746 | 746 |
|
747 | 747 | @support.cpython_only |
| 748 | + @skip_emscripten_stack_overflow() |
748 | 749 | def test_ast_recursion_limit(self): |
749 | 750 | fail_depth = support.exceeds_recursion_limit() |
750 | 751 | crash_depth = 100_000 |
@@ -1661,13 +1662,15 @@ def test_level_as_none(self): |
1661 | 1662 | exec(code, ns) |
1662 | 1663 | self.assertIn('sleep', ns) |
1663 | 1664 |
|
| 1665 | + @skip_emscripten_stack_overflow() |
1664 | 1666 | def test_recursion_direct(self): |
1665 | 1667 | e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0, operand=ast.Constant(1)) |
1666 | 1668 | e.operand = e |
1667 | 1669 | with self.assertRaises(RecursionError): |
1668 | 1670 | with support.infinite_recursion(): |
1669 | 1671 | compile(ast.Expression(e), "<test>", "eval") |
1670 | 1672 |
|
| 1673 | + @skip_emscripten_stack_overflow() |
1671 | 1674 | def test_recursion_indirect(self): |
1672 | 1675 | e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0, operand=ast.Constant(1)) |
1673 | 1676 | f = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0, operand=ast.Constant(1)) |
|
0 commit comments