mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
test_ast uses infinite_recursion() to prevent crash (#100104)
test.test_ast_recursion_limit() now uses infinite_recursion() of test.support to prevent crashes on debug builds. Before this change, the test crashed on ARM64 Windows 3.x buildbot worker which builds Python in debug mode.
This commit is contained in:
parent
e8fff515f0
commit
cd67c1bb30
1 changed files with 2 additions and 1 deletions
|
@ -837,7 +837,8 @@ class AST_Tests(unittest.TestCase):
|
|||
details = "Compiling ({!r} + {!r} * {})".format(
|
||||
prefix, repeated, depth)
|
||||
with self.assertRaises(RecursionError, msg=details):
|
||||
ast.parse(broken)
|
||||
with support.infinite_recursion():
|
||||
ast.parse(broken)
|
||||
|
||||
check_limit("a", "()")
|
||||
check_limit("a", ".b")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue