Skip to content

Commit 2d03a13

Browse files
committed
Prevent logs from getting spammed.
1 parent b34cde6 commit 2d03a13

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Lib/test/test_free_threading/test_generators.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ def with_iterations(gen):
2828

2929
threads.append(Thread(target=with_iterations, args=(gen,)))
3030

31-
# Errors might come up, but that's fine.
32-
# All we care about is that this doesn't crash.
33-
for thread in threads:
34-
thread.start()
35-
36-
for thread in threads:
37-
thread.join()
31+
with threading_helper.catch_threading_exception():
32+
# Errors might come up, but that's fine.
33+
# All we care about is that this doesn't crash.
34+
for thread in threads:
35+
thread.start()
36+
37+
for thread in threads:
38+
thread.join()
3839

3940
def test_generator_send(self):
4041
self.stress_generator(lambda gen: next(gen))

0 commit comments

Comments
 (0)