@@ -49,7 +49,7 @@ |
|
|
49 |
49 |
# processes |
50 |
50 |
"reap_children", |
51 |
51 |
# miscellaneous |
52 |
|
-"run_with_locale", "swap_item", "findfile", |
|
52 |
+"run_with_locale", "swap_item", "findfile", "infinite_recursion", |
53 |
53 |
"swap_attr", "Matcher", "set_memlimit", "SuppressCrashReport", "sortdict", |
54 |
54 |
"run_with_tz", "PGO", "missing_compiler_executable", |
55 |
55 |
"ALWAYS_EQ", "NEVER_EQ", "LARGEST", "SMALLEST", |
@@ -2002,6 +2002,12 @@ def check_disallow_instantiation(testcase, tp, *args, **kwds): |
|
|
2002 |
2002 |
|
2003 |
2003 |
@contextlib.contextmanager |
2004 |
2004 |
def infinite_recursion(max_depth=75): |
|
2005 |
+"""Set a lower limit for tests that interact with infinite recursions |
|
2006 |
+ (e.g test_ast.ASTHelpers_Test.test_recursion_direct) since on some |
|
2007 |
+ debug windows builds, due to not enough functions being inlined the |
|
2008 |
+ stack size might not handle the default recursion limit (1000). See |
|
2009 |
+ bpo-11105 for details.""" |
|
2010 |
+ |
2005 |
2011 |
original_depth = sys.getrecursionlimit() |
2006 |
2012 |
try: |
2007 |
2013 |
sys.setrecursionlimit(max_depth) |