Skip to content

Commit 75a1a6c

Browse files
committed
[feat] Extend warning message about unclosed event loops with additional possible cause.
Closes #531 Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
1 parent 1821542 commit 75a1a6c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/source/reference/changelog.rst

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Changelog
55
0.22.0 (UNRELEASED)
66
===================
77
- Output a proper error message when an invalid ``asyncio_mode`` is selected.
8+
- Extend warning message about unclosed event loops with additional possible cause.
9+
`#531 <https://github.com/pytest-dev/pytest-asyncio/issues/531>`_
810

911
0.21.0 (2023-03-19)
1012
===================

pytest_asyncio/plugin.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,8 @@ def _add_finalizers(fixturedef: FixtureDef, *finalizers: Callable[[], object]) -
434434
library will no longer do so. In order to ensure compatibility with future
435435
versions, please make sure that:
436436
1. Any custom "event_loop" fixture properly closes the loop after yielding it
437-
2. Your code does not modify the event loop in async fixtures or tests
437+
2. The scopes of your custom "event_loop" fixtures do not overlap
438+
3. Your code does not modify the event loop in async fixtures or tests
438439
"""
439440
)
440441

0 commit comments

Comments
 (0)