How to use the same asyncio.Task between fixtures and each test coroutine so that they can have access to the same scoped db sessions #624
Labels
needsinfo
Requires additional information from the issue author
I've been trying to get the same
sqlalchemy.ext.asyncio.AsyncSession
instances bysqlalchemy.ext.asyncio.async_scoped_session
both from the initialisation methods of the Factory classes and from pytest fixtures provided as function arguments with each testcase. The problem is that the tasks in which theasync_scoped_session
is called are different, so the sessions provided as fixtures don't hold the pending states flushed by the Factory classes.The text was updated successfully, but these errors were encountered: