Skip to content

Commit 3a1cf62

Browse files
committed
Explicitly close connection
1 parent 221ea3f commit 3a1cf62

File tree

3 files changed

+131
-128
lines changed

3 files changed

+131
-128
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ accel = [
4242
"uvloop; sys_platform != 'win32' and implementation_name == 'cpython'",
4343
"orjson",
4444
]
45-
sqlite = ["aiosqlite (>=0.22.0,<1.0.0)"]
45+
sqlite = ["aiosqlite (>=0.16.0,<1.0.0)"]
4646
asyncpg = ["asyncpg"]
4747
aiomysql = ["aiomysql"]
4848
asyncmy = ["asyncmy (>=0.2.8,<1.0.0); python_version < '4.0'"]

tests/test_table_name.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ async def test_glabal_name_generator(self):
3636

3737
async def test_custom_table_name_precedence(self):
3838
self.assertEqual(CustomTable._meta.db_table, "my_custom_table")
39+
40+
async def _tearDownDB(self) -> None:
41+
await Tortoise.get_connection("default").close()

0 commit comments

Comments
 (0)