Skip to content

Commit

Permalink
fix(test): test persistent task pruning
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Feb 4, 2024
1 parent 1829381 commit d570fcc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ async def task():
# there is no local reference to the newly created task. does it still complete?
await asyncio.sleep(2)
assert check is True

@pytest.mark.asyncio_cooperative
async def test_pruning():
async def task():
return
create_task(coro=task(), skip_gc_until_done=True)
await asyncio.sleep(0)
# previously, it failed here
create_task(coro=task(), skip_gc_until_done=True)

0 comments on commit d570fcc

Please sign in to comment.