From 012e77eb5c3ba3d411f5967a7f368ebdb42ab88c Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Thu, 10 Feb 2022 14:57:20 +0200 Subject: Fix warning: asyncio.events._event_loop_policy was modified by test_asyncio (GH-31253) --- Lib/test/test_asyncio/test_unix_events.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Lib/test/test_asyncio/test_unix_events.py') diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py index c3422850ce..2f68459d30 100644 --- a/Lib/test/test_asyncio/test_unix_events.py +++ b/Lib/test/test_asyncio/test_unix_events.py @@ -26,6 +26,10 @@ from asyncio import unix_events from test.test_asyncio import utils as test_utils +def tearDownModule(): + asyncio.set_event_loop_policy(None) + + MOCK_ANY = mock.ANY @@ -39,10 +43,6 @@ def SIGNAL(signum): return 32768 - signum -def tearDownModule(): - asyncio.set_event_loop_policy(None) - - def close_pipe_transport(transport): # Don't call transport.close() because the event loop and the selector # are mocked -- cgit v1.2.1