You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#620 introduced the asyncio_event_loop mark, which provides a class-scoped or module-scoped event loop when a class or module is marked, respectively. The mark optionally allows specifying one or more event loop policies used to create the scoped event loop. This functionality is intended to supersede the practice of overriding the event_loop fixture.
#631 deprecated event_loop fixture overrides, but there's no replacement for custom loop policies with function-scoped loops, for example:
seifertm
changed the title
Allow the _asyncio_event_loop_ mark to be applied to test coroutines
Allow the *asyncio_event_loop* mark to be applied to test coroutines
Oct 24, 2023
seifertm
changed the title
Allow the *asyncio_event_loop* mark to be applied to test coroutines
Allow the asyncio_event_loop mark to be applied to test coroutines
Oct 24, 2023
The setup of asyncio_event_loop needs to happen before pytest_generate_tests. For classes and modules this is done in pytest_collectstart. Unfortunately, this hook doesn't seem to be called for pytest.Function items.
#620 introduced the asyncio_event_loop mark, which provides a class-scoped or module-scoped event loop when a class or module is marked, respectively. The mark optionally allows specifying one or more event loop policies used to create the scoped event loop. This functionality is intended to supersede the practice of overriding the event_loop fixture.
#631 deprecated event_loop fixture overrides, but there's no replacement for custom loop policies with function-scoped loops, for example:
Therefore, the asyncio_event_loop mark should be adjusted to allow its application to test functions, for example:
The text was updated successfully, but these errors were encountered: