aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_windows_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_windows_events.py')
-rw-r--r--Lib/test/test_asyncio/test_windows_events.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_asyncio/test_windows_events.py b/Lib/test/test_asyncio/test_windows_events.py
index 69e9905205e..0af3368627a 100644
--- a/Lib/test/test_asyncio/test_windows_events.py
+++ b/Lib/test/test_asyncio/test_windows_events.py
@@ -19,7 +19,7 @@ from test.test_asyncio import utils as test_utils
def tearDownModule():
- asyncio._set_event_loop_policy(None)
+ asyncio.events._set_event_loop_policy(None)
class UpperProto(asyncio.Protocol):
@@ -330,16 +330,16 @@ class WinPolicyTests(WindowsEventsTestCase):
async def main():
self.assertIsInstance(asyncio.get_running_loop(), asyncio.SelectorEventLoop)
- old_policy = asyncio._get_event_loop_policy()
+ old_policy = asyncio.events._get_event_loop_policy()
try:
with self.assertWarnsRegex(
DeprecationWarning,
"'asyncio.WindowsSelectorEventLoopPolicy' is deprecated",
):
- asyncio._set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
+ asyncio.events._set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
asyncio.run(main())
finally:
- asyncio._set_event_loop_policy(old_policy)
+ asyncio.events._set_event_loop_policy(old_policy)
def test_proactor_win_policy(self):
async def main():
@@ -347,16 +347,16 @@ class WinPolicyTests(WindowsEventsTestCase):
asyncio.get_running_loop(),
asyncio.ProactorEventLoop)
- old_policy = asyncio._get_event_loop_policy()
+ old_policy = asyncio.events._get_event_loop_policy()
try:
with self.assertWarnsRegex(
DeprecationWarning,
"'asyncio.WindowsProactorEventLoopPolicy' is deprecated",
):
- asyncio._set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
+ asyncio.events._set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
asyncio.run(main())
finally:
- asyncio._set_event_loop_policy(old_policy)
+ asyncio.events._set_event_loop_policy(old_policy)
if __name__ == '__main__':