GH-111801: set a lower recursion limit for test_infintely_many_bases() in test_isinstance (#113997)

This commit is contained in:
Brett Cannon 2024-01-12 15:19:21 -08:00 committed by GitHub
parent a47353d587
commit 3c19ee0422
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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.