Skip to content

Commit 1e7e952

Browse files
committed
simplify test_asyncio.test_taskgroups no_other_refs
1 parent 6e63c47 commit 1e7e952

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Lib/test/test_asyncio/test_taskgroups.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ def get_error_types(eg):
3232

3333
def no_other_refs():
3434
# due to gh-124392 coroutines now refer to their locals
35-
coro = asyncio.current_task().get_coro()
36-
frame = sys._getframe(1)
37-
while coro.cr_frame != frame:
38-
coro = coro.cr_await
39-
return [coro]
35+
return [sys._getframe(1).f_generator]
4036

4137

4238
def set_gc_state(enabled):

0 commit comments

Comments
 (0)