Skip to content

Commit bed61d9

Browse files
committed
misc fix test_list.test_free_threading, no tsan req
1 parent f220d83 commit bed61d9

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Lib/test/test_list.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -381,22 +381,22 @@ def foo(x):
381381

382382
self.assertEqual(foo(list(range(10))), 45)
383383

384-
@unittest.skipUnless(support.Py_GIL_DISABLED and
385-
support.check_sanitizer(thread=True),
384+
@unittest.skipUnless(support.Py_GIL_DISABLED,
386385
'this test can only possibly fail with GIL disabled')
387386
@threading_helper.reap_threads
388387
@threading_helper.requires_working_threading()
389388
def test_free_threading(self):
390389
def mutate(b, l):
391-
d = [None] * 100
390+
d = [None] * 500
392391
b.wait()
392+
l.extend(d)
393393

394-
for _ in range(100):
395-
l.extend(d)
396-
del l[:]
394+
for _ in range(1000):
395+
del l[:360]
396+
l[1:-1] = d
397397

398-
NUM_THREADS = 10
399-
barrier = threading.Barrier(len(NUM_THREADS))
398+
NUM_THREADS = 20
399+
barrier = threading.Barrier(NUM_THREADS)
400400
threads = []
401401
l = []
402402

0 commit comments

Comments
 (0)