mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-111803: Make test_deep_nesting from test_plistlib more strict (GH-114026)
It is no longer silently passed if RecursionError was raised for low recursion depth.
This commit is contained in:
parent
42d72b23dd
commit
db1c18eb62
1 changed files with 2 additions and 2 deletions
|
|
@ -971,12 +971,12 @@ def test_cycles(self):
|
|||
self.assertIs(b['x'], b)
|
||||
|
||||
def test_deep_nesting(self):
|
||||
for N in [300, 100000]:
|
||||
for N in [50, 300, 100_000]:
|
||||
chunks = [b'\xa1' + (i + 1).to_bytes(4, 'big') for i in range(N)]
|
||||
try:
|
||||
result = self.decode(*chunks, b'\x54seed', offset_size=4, ref_size=4)
|
||||
except RecursionError:
|
||||
pass
|
||||
self.assertGreater(N, sys.getrecursionlimit())
|
||||
else:
|
||||
for i in range(N):
|
||||
self.assertIsInstance(result, list)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue