Skip to content

Commit

Permalink
simplify test_asyncio.test_taskgroups no_other_refs
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Jan 25, 2025
1 parent 6e63c47 commit 1e7e952
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Lib/test/test_asyncio/test_taskgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ def get_error_types(eg):

def no_other_refs():
# due to gh-124392 coroutines now refer to their locals
coro = asyncio.current_task().get_coro()
frame = sys._getframe(1)
while coro.cr_frame != frame:
coro = coro.cr_await
return [coro]
return [sys._getframe(1).f_generator]


def set_gc_state(enabled):
Expand Down

0 comments on commit 1e7e952

Please sign in to comment.