Skip to content

Commit 242ea2a

Browse files
committed
refactor: update database creation documentation in conftest.py
1 parent da7d492 commit 242ea2a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def anyio_backend(request):
2323
return request.param
2424

2525
def _create_db(conn) -> None:
26-
"""Create a database schema if it doesn't exist."""
26+
"""Create the test database if it doesn't exist."""
2727
try:
2828
conn.execute(text("CREATE DATABASE testdb"))
2929
except ProgrammingError:
@@ -54,7 +54,7 @@ async def start_db():
5454

5555
# Now, connect to the newly created `testdb` with `test_engine`
5656
async with test_engine.begin() as conn:
57-
await conn.execute(text("COMMIT")) # Ensure we're not in a transaction
57+
5858
await conn.run_sync(_create_db_schema)
5959
await conn.run_sync(Base.metadata.drop_all)
6060
await conn.run_sync(Base.metadata.create_all)

0 commit comments

Comments
 (0)