Skip to content

Commit 90c334a

Browse files
SyntaxColoringseifertm
authored andcommitted
One more.
1 parent fb76feb commit 90c334a

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
@@ -673,7 +673,9 @@ def _temporary_event_loop_policy(policy: AbstractEventLoopPolicy) -> Iterator[No
673673
# subsequent tests from side-effects. We close this loop before restoring
674674
# the old loop to avoid ResourceWarnings.
675675
try:
676-
asyncio.get_event_loop().close()
676+
with warnings.catch_warnings():
677+
warnings.simplefilter("ignore", DeprecationWarning)
678+
asyncio.get_event_loop().close()
677679
except RuntimeError:
678680
pass
679681
asyncio.set_event_loop(old_loop)

0 commit comments

Comments
 (0)