mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +00:00
Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.
This commit is contained in:
parent
27be130ec7
commit
f488fb422a
31 changed files with 101 additions and 69 deletions
|
@ -211,8 +211,8 @@ class SysModuleTest(unittest.TestCase):
|
|||
for i in (50, 1000):
|
||||
# Issue #5392: stack overflow after hitting recursion limit twice
|
||||
sys.setrecursionlimit(i)
|
||||
self.assertRaises(RuntimeError, f)
|
||||
self.assertRaises(RuntimeError, f)
|
||||
self.assertRaises(RecursionError, f)
|
||||
self.assertRaises(RecursionError, f)
|
||||
finally:
|
||||
sys.setrecursionlimit(oldlimit)
|
||||
|
||||
|
@ -225,7 +225,7 @@ class SysModuleTest(unittest.TestCase):
|
|||
def f():
|
||||
try:
|
||||
f()
|
||||
except RuntimeError:
|
||||
except RecursionError:
|
||||
f()
|
||||
|
||||
sys.setrecursionlimit(%d)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue