Skip to content

Commit 91edbbe

Browse files
tjkusonseifertm
authored andcommitted
Update new fragment
1 parent 9f9da02 commit 91edbbe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

changelog.d/1164.added.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
Added the ``pytest_asyncio_loop_factories`` hook to parametrize asyncio tests with custom event loop factories.
22

3-
The hook now returns a mapping of factory names to loop factories, and ``pytest.mark.asyncio(loop_factories=[...])`` can be used to select a subset of configured factories per test.
3+
The hook returns a mapping of factory names to loop factories, and ``pytest.mark.asyncio(loop_factories=[...])`` selects a subset of configured factories per test. When a single factory is configured, test names are unchanged on pytest 8.4+.
4+
5+
Synchronous ``@pytest_asyncio.fixture`` functions now see the correct event loop when custom loop factories are configured, even when test code disrupts the current event loop (e.g., via ``asyncio.run()`` or ``asyncio.set_event_loop(None)``).

0 commit comments

Comments
 (0)