Skip to content

Commit 65b484d

Browse files
authored
pythongh-128694: Fix (env changed) error in test_inspect (python#128702)
1 parent 2fcdc84 commit 65b484d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test_inspect/test_inspect.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from annotationlib import Format, ForwardRef
2+
import asyncio
23
import builtins
34
import collections
45
import copy
@@ -2791,6 +2792,10 @@ async def number_asyncgen():
27912792
async def asyncTearDown(self):
27922793
await self.asyncgen.aclose()
27932794

2795+
@classmethod
2796+
def tearDownClass(cls):
2797+
asyncio._set_event_loop_policy(None)
2798+
27942799
def _asyncgenstate(self):
27952800
return inspect.getasyncgenstate(self.asyncgen)
27962801

0 commit comments

Comments
 (0)