Scoped event loops based on pytest marks by seifertm · Pull Request #620 · pytest-dev/pytest-asyncio
added 2 commits
September 26, 2023 15:17…vent loop when a module has the mark. Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
…nt loop implementation to pollute the test environment. Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
…event loop implementation from polluting the test environment. Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
…tor tests no longer requires an explicit event loop argument. The wrapper retrieves the currently set loop via asyncio.get_event_loop, instead. Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
…the function-scoped event_loop fixture. They rather provide a fixture with a different name, based on the nodeid of the pytest.Collector that has the "asyncio_event_loop" mark. When a test requests the event_loop fixture and a dynamically generated event loop with class or module scope, pytest-asyncio will raise an error. Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
…e executed in the same event loop. Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
seifertm
changed the title
Provide a class-scoped asyncio event loop when a class has the asyncio mark
Deprecate event_loop fixture overrides
seifertm
changed the title
Deprecate event_loop fixture overrides
Scoped event loops based on pytest marks
seifertm
marked this pull request as ready for review
seifertm
deleted the
feat/scope-event-loop-based-on-asyncio-mark
branch
seifertm
restored the
feat/scope-event-loop-based-on-asyncio-mark
branch
This was referenced
Oct 22, 2023
seifertm
deleted the
feat/scope-event-loop-based-on-asyncio-mark
branch
seifertm
restored the
feat/scope-event-loop-based-on-asyncio-mark
branch
seifertm
deleted the
feat/scope-event-loop-based-on-asyncio-mark
branch
This was referenced
Oct 23, 2023This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters