From d233dd199ecfeb36fcd230589b4f435da820d9b2 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 11 Feb 2022 14:10:09 -0800 Subject: [PATCH] Prevent warning "test altered the execution environment" --- Lib/test/test_asyncio/test_taskgroups.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/test/test_asyncio/test_taskgroups.py b/Lib/test/test_asyncio/test_taskgroups.py index e53e1265724b6a..4b5c409090a42a 100644 --- a/Lib/test/test_asyncio/test_taskgroups.py +++ b/Lib/test/test_asyncio/test_taskgroups.py @@ -23,6 +23,11 @@ import unittest +# To prevent a warning "test altered the execution environment" +def tearDownModule(): + asyncio.set_event_loop_policy(None) + + class MyExc(Exception): pass