We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb76feb commit 90c334aCopy full SHA for 90c334a
pytest_asyncio/plugin.py
@@ -673,7 +673,9 @@ def _temporary_event_loop_policy(policy: AbstractEventLoopPolicy) -> Iterator[No
673
# subsequent tests from side-effects. We close this loop before restoring
674
# the old loop to avoid ResourceWarnings.
675
try:
676
- asyncio.get_event_loop().close()
+ with warnings.catch_warnings():
677
+ warnings.simplefilter("ignore", DeprecationWarning)
678
+ asyncio.get_event_loop().close()
679
except RuntimeError:
680
pass
681
asyncio.set_event_loop(old_loop)
0 commit comments