Skip to content

Commit 2d3bdd0

Browse files
Simplify test a lil' more
1 parent c3837af commit 2d3bdd0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_pyexpat.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,9 +705,11 @@ def test_trigger_leak(self):
705705
@support.skip_emscripten_stack_overflow()
706706
@support.skip_wasi_stack_overflow()
707707
def test_deeply_nested_content_model(self):
708+
# This should raise a RecursionError and not crash.
709+
# See https://github.com/python/cpython/issues/
710+
N = 500_000
708711
data = (b'<!DOCTYPE root [\n<!ELEMENT root '
709-
+ b'(a, ' * 500000 + b'a'
710-
+ b')' * 500000
712+
+ b'(a, ' * N + b'a' + b')' * N
711713
+ b'>\n]>\n<root/>\n')
712714

713715
parser = expat.ParserCreate()

0 commit comments

Comments
 (0)