Skip to content

Commit

Permalink
asyncio.run(port_afinalizer())
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxColoring authored and seifertm committed May 14, 2024
1 parent 0107fd7 commit 3ffdfc5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/async_fixtures/test_async_fixtures_with_finalizer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import asyncio
import functools
import warnings

import pytest

Expand Down Expand Up @@ -34,11 +33,7 @@ async def port_afinalizer():
# RuntimeError is raised if task is created on a different loop
await finalizer

with warnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
loop = asyncio.get_event_loop()

loop.run_until_complete(port_afinalizer())
asyncio.run(port_afinalizer())

worker = asyncio.ensure_future(asyncio.sleep(0.2))
request.addfinalizer(functools.partial(port_finalizer, worker))
Expand Down

0 comments on commit 3ffdfc5

Please sign in to comment.