33import unittest
44from concurrent import futures
55from test import support
6- from test .support import threading_helper
6+ from test .support import threading_helper , warnings_helper
77
88from .util import (
99 CANCELLED_FUTURE , CANCELLED_AND_NOTIFIED_FUTURE , EXCEPTION_FUTURE ,
@@ -22,6 +22,7 @@ def wait_and_raise(e):
2222
2323
2424class WaitTests :
25+ @warnings_helper .ignore_warnings (category = DeprecationWarning ) # gh-135427
2526 def test_20369 (self ):
2627 # See https://bugs.python.org/issue20369
2728 future = self .executor .submit (mul , 1 , 2 )
@@ -30,7 +31,7 @@ def test_20369(self):
3031 self .assertEqual ({future }, done )
3132 self .assertEqual (set (), not_done )
3233
33-
34+ @ warnings_helper . ignore_warnings ( category = DeprecationWarning ) # gh-135427
3435 def test_first_completed (self ):
3536 event = self .create_event ()
3637 future1 = self .executor .submit (mul , 21 , 2 )
@@ -47,6 +48,7 @@ def test_first_completed(self):
4748 event .set ()
4849 future2 .result () # wait for job to finish
4950
51+ @warnings_helper .ignore_warnings (category = DeprecationWarning ) # gh-135427
5052 def test_first_completed_some_already_completed (self ):
5153 event = self .create_event ()
5254 future1 = self .executor .submit (event .wait )
@@ -64,6 +66,7 @@ def test_first_completed_some_already_completed(self):
6466 event .set ()
6567 future1 .result () # wait for job to finish
6668
69+ @warnings_helper .ignore_warnings (category = DeprecationWarning ) # gh-135427
6770 def test_first_exception (self ):
6871 event1 = self .create_event ()
6972 event2 = self .create_event ()
@@ -93,6 +96,7 @@ def wait_for_future1():
9396 event2 .set ()
9497 future3 .result () # wait for job to finish
9598
99+ @warnings_helper .ignore_warnings (category = DeprecationWarning ) # gh-135427
96100 def test_first_exception_some_already_complete (self ):
97101 event = self .create_event ()
98102 future1 = self .executor .submit (divmod , 21 , 0 )
@@ -114,6 +118,7 @@ def test_first_exception_some_already_complete(self):
114118 event .set ()
115119 future2 .result () # wait for job to finish
116120
121+ @warnings_helper .ignore_warnings (category = DeprecationWarning ) # gh-135427
117122 def test_first_exception_one_already_failed (self ):
118123 event = self .create_event ()
119124 future1 = self .executor .submit (event .wait )
@@ -129,6 +134,7 @@ def test_first_exception_one_already_failed(self):
129134 event .set ()
130135 future1 .result () # wait for job to finish
131136
137+ @warnings_helper .ignore_warnings (category = DeprecationWarning ) # gh-135427
132138 def test_all_completed (self ):
133139 future1 = self .executor .submit (divmod , 2 , 0 )
134140 future2 = self .executor .submit (mul , 2 , 21 )
@@ -148,6 +154,7 @@ def test_all_completed(self):
148154 future2 ]), finished )
149155 self .assertEqual (set (), pending )
150156
157+ @warnings_helper .ignore_warnings (category = DeprecationWarning ) # gh-135427
151158 def test_timeout (self ):
152159 short_timeout = 0.050
153160
0 commit comments