https://github.com/python/cpython/commit/65b484db97b170af0f0e50655c4dcc6b9b1af8e9
commit: 65b484db97b170af0f0e50655c4dcc6b9b1af8e9
branch: main
author: sobolevn <[email protected]>
committer: sobolevn <[email protected]>
date: 2025-01-10T13:25:02+03:00
summary:

gh-128694: Fix `(env changed)` error in `test_inspect` (#128702)

files:
M Lib/test/test_inspect/test_inspect.py

diff --git a/Lib/test/test_inspect/test_inspect.py 
b/Lib/test/test_inspect/test_inspect.py
index 345a57a5cfee2d..6457bc523de460 100644
--- a/Lib/test/test_inspect/test_inspect.py
+++ b/Lib/test/test_inspect/test_inspect.py
@@ -1,4 +1,5 @@
 from annotationlib import Format, ForwardRef
+import asyncio
 import builtins
 import collections
 import copy
@@ -2791,6 +2792,10 @@ async def number_asyncgen():
     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)
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to