diff options
author | Brett Cannon <brett@python.org> | 2024-01-12 23:19:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-12 23:19:21 (GMT) |
commit | 3c19ee0422e9b9f1582fb74931c174a84583bca0 (patch) | |
tree | 9ebc1b5afbd6a8d1036dfd3cd3adb2137a1f4c05 | |
parent | a47353d587b78bb5501b21343d9bca739c49a43a (diff) | |
download | cpython-3c19ee0422e9b9f1582fb74931c174a84583bca0.zip cpython-3c19ee0422e9b9f1582fb74931c174a84583bca0.tar.gz cpython-3c19ee0422e9b9f1582fb74931c174a84583bca0.tar.bz2 |
GH-111801: set a lower recursion limit for `test_infintely_many_bases()` in `test_isinstance` (#113997)
-rw-r--r-- | Lib/test/test_isinstance.py | 2 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Tests/2024-01-12-13-19-12.gh-issue-111801.9hh9DY.rst | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_isinstance.py b/Lib/test/test_isinstance.py index bf9332e..791981b 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 0000000..660fddd --- /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. |