4
4
5
5
# Skip tests if we don't have concurrent.futures.
6
6
support .import_module ('concurrent.futures' )
7
- module_deprecation_tokens = set ()
8
7
9
8
10
9
def load_tests (loader , _ , pattern ):
@@ -21,26 +20,18 @@ class AsyncioTestSuite(unittest.TestSuite):
21
20
would be tedious, let's run this once and for all.
22
21
"""
23
22
def run (self , result , debug = False ):
23
+ ignore = support .ignore_deprecations_from
24
+ tokens = {
25
+ ignore ("asyncio.base_events" , like = r".*loop argument.*" ),
26
+ ignore ("asyncio.unix_events" , like = r".*loop argument.*" ),
27
+ ignore ("asyncio.futures" , like = r".*loop argument.*" ),
28
+ ignore ("asyncio.runners" , like = r".*loop argument.*" ),
29
+ ignore ("asyncio.subprocess" , like = r".*loop argument.*" ),
30
+ ignore ("asyncio.tasks" , like = r".*loop argument.*" ),
31
+ ignore ("test.test_asyncio.test_queues" , like = r".*loop argument.*" ),
32
+ ignore ("test.test_asyncio.test_tasks" , like = r".*loop argument.*" ),
33
+ }
24
34
try :
25
- setUpModule ()
26
35
super ().run (result , debug = debug )
27
36
finally :
28
- tearDownModule ()
29
-
30
-
31
- def setUpModule ():
32
- ignore = support .ignore_deprecations_from
33
- module_deprecation_tokens .update ((
34
- ignore ("asyncio.base_events" , like = r".*loop argument.*" ),
35
- ignore ("asyncio.unix_events" , like = r".*loop argument.*" ),
36
- ignore ("asyncio.futures" , like = r".*loop argument.*" ),
37
- ignore ("asyncio.runners" , like = r".*loop argument.*" ),
38
- ignore ("asyncio.subprocess" , like = r".*loop argument.*" ),
39
- ignore ("asyncio.tasks" , like = r".*loop argument.*" ),
40
- ignore ("test.test_asyncio.test_queues" , like = r".*loop argument.*" ),
41
- ignore ("test.test_asyncio.test_tasks" , like = r".*loop argument.*" ),
42
- ))
43
-
44
-
45
- def tearDownModule ():
46
- support .clear_ignored_deprecations (* module_deprecation_tokens )
37
+ support .clear_ignored_deprecations (* tokens )
0 commit comments