]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-128694: Fix `(env changed)` error in `test_inspect` (#128702)
authorsobolevn <mail@sobolevn.me>
Fri, 10 Jan 2025 10:25:02 +0000 (13:25 +0300)
committerGitHub <noreply@github.com>
Fri, 10 Jan 2025 10:25:02 +0000 (13:25 +0300)
Lib/test/test_inspect/test_inspect.py

index 345a57a5cfee2d2c6998f2d8bbfa44d52f0d2b2c..6457bc523de4600ca56dc3842c7899da682e4806 100644 (file)
@@ -1,4 +1,5 @@
 from annotationlib import Format, ForwardRef
+import asyncio
 import builtins
 import collections
 import copy
@@ -2791,6 +2792,10 @@ class TestGetAsyncGenState(unittest.IsolatedAsyncioTestCase):
     async def asyncTearDown(self):
         await self.asyncgen.aclose()
 
+    @classmethod
+    def tearDownClass(cls):
+        asyncio._set_event_loop_policy(None)
+
     def _asyncgenstate(self):
         return inspect.getasyncgenstate(self.asyncgen)