Skip to content

Commit d332da1

Browse files
committed
Fix the test (again).
1 parent ab087ce commit d332da1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_list.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def test_list_init_thread_safety(self):
318318
import contextlib
319319

320320
def my_generator():
321-
for i in range(100000):
321+
for i in range(1000000):
322322
yield i
323323

324324

@@ -338,8 +338,9 @@ def gen_to_list(gen):
338338
nonlocal amount
339339
amount += 1
340340

341+
generator = my_generator()
341342
with threading_helper.catch_threading_exception() as cm:
342-
ts = [Thread(target=gen_to_list, args=(my_generator(),)) for _ in range(thread_count)]
343+
ts = [Thread(target=gen_to_list, args=(generator,)) for _ in range(thread_count)]
343344
for t in ts:
344345
t.start()
345346

0 commit comments

Comments
 (0)