From 242ea2ab9ae20d298fd2cc58135e800f5db891a5 Mon Sep 17 00:00:00 2001 From: grillazz Date: Sun, 28 Dec 2025 18:20:49 +0100 Subject: [PATCH] refactor: update database creation documentation in conftest.py --- tests/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 3f232c6..21df394 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -23,7 +23,7 @@ def anyio_backend(request): return request.param def _create_db(conn) -> None: - """Create a database schema if it doesn't exist.""" + """Create the test database if it doesn't exist.""" try: conn.execute(text("CREATE DATABASE testdb")) except ProgrammingError: @@ -54,7 +54,7 @@ async def start_db(): # Now, connect to the newly created `testdb` with `test_engine` async with test_engine.begin() as conn: - await conn.execute(text("COMMIT")) # Ensure we're not in a transaction + await conn.run_sync(_create_db_schema) await conn.run_sync(Base.metadata.drop_all) await conn.run_sync(Base.metadata.create_all)