|
1 | 1 | from annotationlib import Format, ForwardRef |
2 | | -import asyncio |
3 | 2 | import builtins |
4 | 3 | import collections |
5 | 4 | import copy |
@@ -73,11 +72,6 @@ def revise(filename, *args): |
73 | 72 | git = mod.StupidGit() |
74 | 73 |
|
75 | 74 |
|
76 | | -def tearDownModule(): |
77 | | - if support.has_socket_support: |
78 | | - asyncio._set_event_loop_policy(None) |
79 | | - |
80 | | - |
81 | 75 | def signatures_with_lexicographic_keyword_only_parameters(): |
82 | 76 | """ |
83 | 77 | Yields a whole bunch of functions with only keyword-only parameters, |
@@ -1172,10 +1166,9 @@ def f(self): |
1172 | 1166 | ) |
1173 | 1167 | def test_nested_class_definition_inside_async_function(self): |
1174 | 1168 | import asyncio |
1175 | | - self.addCleanup(asyncio.set_event_loop_policy, None) |
1176 | | - self.assertSourceEqual(asyncio.run(mod2.func225()), 226, 227) |
| 1169 | + self.assertSourceEqual(asyncio.run(mod2.func225(), loop_factory=asyncio.EventLoop), 226, 227) |
1177 | 1170 | self.assertSourceEqual(mod2.cls226, 231, 235) |
1178 | | - self.assertSourceEqual(asyncio.run(mod2.cls226().func232()), 233, 234) |
| 1171 | + self.assertSourceEqual(asyncio.run(mod2.cls226().func232(), loop_factory=asyncio.EventLoop), 233, 234) |
1179 | 1172 |
|
1180 | 1173 | def test_class_definition_same_name_diff_methods(self): |
1181 | 1174 | self.assertSourceEqual(mod2.cls296, 296, 298) |
|
0 commit comments