Skip to content

Commit fb76feb

Browse files
SyntaxColoringseifertm
authored andcommitted
Ignore DeprecationWarnings here, too.
1 parent 3900425 commit fb76feb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pytest_asyncio/plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,9 @@ def wrap_in_sync(
891891
@functools.wraps(func)
892892
def inner(*args, **kwargs):
893893
coro = func(*args, **kwargs)
894-
_loop = asyncio.get_event_loop()
894+
with warnings.catch_warnings():
895+
warnings.simplefilter("ignore", DeprecationWarning)
896+
_loop = asyncio.get_event_loop()
895897
task = asyncio.ensure_future(coro, loop=_loop)
896898
try:
897899
_loop.run_until_complete(task)

0 commit comments

Comments
 (0)