Skip to content

Commit b08021d

Browse files
committed
Add decorator to new tests
1 parent 776e2b7 commit b08021d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_concurrent_futures/test_thread_pool.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import unittest
88
from concurrent import futures
99
from test import support
10+
from test.support import warnings_helper
1011

1112
from .executor import ExecutorTest, mul
1213
from .util import BaseTestCase, ThreadPoolMixin, setup_module
@@ -53,6 +54,7 @@ def test_idle_thread_reuse(self):
5354
@support.requires_fork()
5455
@unittest.skipUnless(hasattr(os, 'register_at_fork'), 'need os.register_at_fork')
5556
@support.requires_resource('cpu')
57+
@warnings_helper.ignore_fork_in_thread_deprecation_warnings()
5658
def test_hang_global_shutdown_lock(self):
5759
# bpo-45021: _global_shutdown_lock should be reinitialized in the child
5860
# process, otherwise it will never exit
@@ -68,6 +70,7 @@ def submit(pool):
6870

6971
@support.requires_fork()
7072
@unittest.skipUnless(hasattr(os, 'register_at_fork'), 'need os.register_at_fork')
73+
@warnings_helper.ignore_fork_in_thread_deprecation_warnings()
7174
def test_process_fork_from_a_threadpool(self):
7275
# bpo-43944: clear concurrent.futures.thread._threads_queues after fork,
7376
# otherwise child process will try to join parent thread

0 commit comments

Comments
 (0)