Skip to content

Commit d7f0ca2

Browse files
committed
gh-148605: Remove irepeat() thread test from test_bytes
The bytearray size has no bounds and can grow up to 4 GiB which is way too much memory. Since irepeat() calls were done in parallel, it was not possible to limit the bytearray size.
1 parent 5535c1f commit d7f0ca2

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Lib/test/test_bytes.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,10 +2700,6 @@ def iconcat(b, a): # MODIFIES!
27002700
b.wait()
27012701
a += c
27022702

2703-
def irepeat(b, a): # MODIFIES!
2704-
b.wait()
2705-
a *= 2
2706-
27072703
def subscript(b, a):
27082704
b.wait()
27092705
try: assert a[0] != 0xdd
@@ -2837,9 +2833,10 @@ def check(funcs, a=None, *args):
28372833

28382834
check([clear] + [repeat] * 10)
28392835
check([clear] + [iconcat] * 10)
2840-
check([clear] + [irepeat] * 10)
28412836
check([clear] + [ass_subscript] * 10)
28422837
check([clear] + [repr_] * 10)
2838+
# gh-148605: Do not test "a *= 2" since it allocates up to 4 GiB using
2839+
# 10 threads
28432840

28442841
# value errors
28452842

0 commit comments

Comments
 (0)