mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-108179: Add error message for parser stack overflows (#108256)
This commit is contained in:
parent
7f87ebbc3f
commit
86617518c4
5 changed files with 542 additions and 1063 deletions
|
@ -2335,7 +2335,7 @@ while 1:
|
|||
source = "-" * 100000 + "4"
|
||||
for mode in ["exec", "eval", "single"]:
|
||||
with self.subTest(mode=mode):
|
||||
with self.assertRaises(MemoryError):
|
||||
with self.assertRaisesRegex(MemoryError, r"too complex"):
|
||||
compile(source, "<string>", mode)
|
||||
|
||||
@support.cpython_only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue