Skip to content

Commit

Permalink
[feat] Extend warning message about unclosed event loops with additio…
Browse files Browse the repository at this point in the history
…nal possible cause.

Closes #531

Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
  • Loading branch information
seifertm committed Jul 12, 2023
1 parent 1821542 commit 75a1a6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/source/reference/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Changelog
0.22.0 (UNRELEASED)
===================
- Output a proper error message when an invalid ``asyncio_mode`` is selected.
- Extend warning message about unclosed event loops with additional possible cause.
`#531 <https://github.com/pytest-dev/pytest-asyncio/issues/531>`_

0.21.0 (2023-03-19)
===================
Expand Down
3 changes: 2 additions & 1 deletion pytest_asyncio/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ def _add_finalizers(fixturedef: FixtureDef, *finalizers: Callable[[], object]) -
library will no longer do so. In order to ensure compatibility with future
versions, please make sure that:
1. Any custom "event_loop" fixture properly closes the loop after yielding it
2. Your code does not modify the event loop in async fixtures or tests
2. The scopes of your custom "event_loop" fixtures do not overlap
3. Your code does not modify the event loop in async fixtures or tests
"""
)

Expand Down

0 comments on commit 75a1a6c

Please sign in to comment.