From 012e77eb5c3ba3d411f5967a7f368ebdb42ab88c Mon Sep 17 00:00:00 2001 From: Andrew Svetlov <andrew.svetlov@gmail.com> 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_protocols.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Lib/test/test_asyncio/test_protocols.py') diff --git a/Lib/test/test_asyncio/test_protocols.py b/Lib/test/test_asyncio/test_protocols.py index d8cde6d89aa..0f232631867 100644 --- a/Lib/test/test_asyncio/test_protocols.py +++ b/Lib/test/test_asyncio/test_protocols.py @@ -4,6 +4,12 @@ from unittest import mock import asyncio +def tearDownModule(): + # not needed for the test file but added for uniformness with all other + # asyncio test files for the sake of unified cleanup + asyncio.set_event_loop_policy(None) + + class ProtocolsAbsTests(unittest.TestCase): def test_base_protocol(self): -- cgit v1.2.3