From: Brett Cannon Date: Fri, 12 Jan 2024 23:19:21 +0000 (-0800) Subject: GH-111801: set a lower recursion limit for `test_infintely_many_bases()` in `test_isi... X-Git-Tag: v3.13.0a3~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c19ee0422e9b9f1582fb74931c174a84583bca0;p=thirdparty%2FPython%2Fcpython.git GH-111801: set a lower recursion limit for `test_infintely_many_bases()` in `test_isinstance` (#113997) --- diff --git a/Lib/test/test_isinstance.py b/Lib/test/test_isinstance.py index bf9332e40aea..791981b878b1 100644 --- a/Lib/test/test_isinstance.py +++ b/Lib/test/test_isinstance.py @@ -344,7 +344,7 @@ class TestIsInstanceIsSubclass(unittest.TestCase): pass A.__getattr__ = B.__getattr__ = X.__getattr__ return (A(), B()) - with support.infinite_recursion(): + with support.infinite_recursion(25): self.assertRaises(RecursionError, issubclass, X(), int) diff --git a/Misc/NEWS.d/next/Tests/2024-01-12-13-19-12.gh-issue-111801.9hh9DY.rst b/Misc/NEWS.d/next/Tests/2024-01-12-13-19-12.gh-issue-111801.9hh9DY.rst new file mode 100644 index 000000000000..660fddd4a930 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2024-01-12-13-19-12.gh-issue-111801.9hh9DY.rst @@ -0,0 +1,3 @@ +Lower the recursion limit in ``test_isinstance`` for +``test_infinitely_many_bases()``. This prevents a stack overflow on a +pydebug build of WASI.