fix tests for Pytest-Asyncio running in strict mode
This commit is contained in:
parent
099770c80c
commit
324eb8e9b7
4 changed files with 12 additions and 12 deletions
|
|
@ -1,6 +1,8 @@
|
|||
import asyncio
|
||||
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
|
||||
from unwind import db
|
||||
|
||||
|
||||
|
|
@ -13,7 +15,7 @@ def event_loop():
|
|||
loop.close()
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
@pytest_asyncio.fixture(scope="session")
|
||||
async def shared_conn():
|
||||
c = db.shared_connection()
|
||||
await c.connect()
|
||||
|
|
@ -24,7 +26,7 @@ async def shared_conn():
|
|||
await c.disconnect()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@pytest_asyncio.fixture
|
||||
async def conn(shared_conn):
|
||||
async with shared_conn.transaction(force_rollback=True):
|
||||
yield shared_conn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue