File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change 1
- import os
2
1
from collections .abc import AsyncIterator
3
- from uuid import uuid4
4
2
5
3
import pytest
6
4
from sqlalchemy .orm import clear_mappers
11
9
12
10
@pytest .fixture (scope = "function" )
13
11
async def test_sa_manager () -> AsyncIterator [SQLAlchemyBindManager ]:
14
- test_db_path = f"./{ uuid4 ()} .db"
15
12
clear_mappers ()
16
13
17
14
db_config = SQLAlchemyAsyncConfig (
18
- engine_url = f"sqlite+aiosqlite:/// { test_db_path } " ,
15
+ engine_url = f"sqlite+aiosqlite://" ,
19
16
engine_options = dict (connect_args = {"check_same_thread" : False }),
20
17
)
21
18
sa_manager = SQLAlchemyBindManager (config = db_config )
@@ -25,8 +22,4 @@ async def test_sa_manager() -> AsyncIterator[SQLAlchemyBindManager]:
25
22
await conn .run_sync (v .registry_mapper .metadata .create_all )
26
23
27
24
yield sa_manager
28
- try :
29
- os .unlink (test_db_path )
30
- except FileNotFoundError :
31
- pass
32
25
clear_mappers ()
You can’t perform that action at this time.
0 commit comments