Skip to content

Commit 28764f1

Browse files
committed
gh-128694: Fix (env changed) error in test_inspect
1 parent 5437f66 commit 28764f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_inspect/test_inspect.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@
5050
from test.test_inspect import inspect_deferred_annotations
5151

5252

53-
def tearDownModule():
54-
asyncio._set_event_loop_policy(None)
55-
56-
5753
# Functions tested in this suite:
5854
# ismodule, isclass, ismethod, isfunction, istraceback, isframe, iscode,
5955
# isbuiltin, isroutine, isgenerator, ispackage, isgeneratorfunction, getmembers,
@@ -2796,6 +2792,10 @@ async def number_asyncgen():
27962792
async def asyncTearDown(self):
27972793
await self.asyncgen.aclose()
27982794

2795+
@classmethod
2796+
def tearDownClass(cls):
2797+
asyncio._set_event_loop_policy(None)
2798+
27992799
def _asyncgenstate(self):
28002800
return inspect.getasyncgenstate(self.asyncgen)
28012801

0 commit comments

Comments
 (0)