-
Notifications
You must be signed in to change notification settings - Fork 22
Description
I've initially asked this at https://stackoverflow.com/questions/79451761/using-pytest-twisted-functions-with-pytest-asyncio-fixtures but I now suspect that this is just not possible with the current pytest-twisted code, but maybe it is? If it isn't possible now, can pytest-twisted be improved to support this?
Basically I want to use @pytest_asyncio.fixture
fixtures in test functions that use Twisted with --reactor=asyncio
. It seems that for this to work correctly all pieces need to use the same asyncio event loop? And there is no way to either create a loop and pass it to both pytest-twisted
and pytest-asyncio
or extract the loop used by one of these and pass it to another one? If this line of reasoning is correct (and if I understand how do the pieces work), can it be made possible to modify one or both plugins to be able to share the loop/use the installed one?
I also wonder if there are any workarounds in the mean time.
Thank you.