Skip to content

Commit 3ffdfc5

Browse files
SyntaxColoringseifertm
authored andcommitted
asyncio.run(port_afinalizer())
1 parent 0107fd7 commit 3ffdfc5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tests/async_fixtures/test_async_fixtures_with_finalizer.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import asyncio
22
import functools
3-
import warnings
43

54
import pytest
65

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

37-
with warnings.catch_warnings():
38-
warnings.simplefilter("ignore", DeprecationWarning)
39-
loop = asyncio.get_event_loop()
40-
41-
loop.run_until_complete(port_afinalizer())
36+
asyncio.run(port_afinalizer())
4237

4338
worker = asyncio.ensure_future(asyncio.sleep(0.2))
4439
request.addfinalizer(functools.partial(port_finalizer, worker))

0 commit comments

Comments
 (0)