We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da7d492 commit 242ea2aCopy full SHA for 242ea2a
1 file changed
tests/conftest.py
@@ -23,7 +23,7 @@ def anyio_backend(request):
23
return request.param
24
25
def _create_db(conn) -> None:
26
- """Create a database schema if it doesn't exist."""
+ """Create the test database if it doesn't exist."""
27
try:
28
conn.execute(text("CREATE DATABASE testdb"))
29
except ProgrammingError:
@@ -54,7 +54,7 @@ async def start_db():
54
55
# Now, connect to the newly created `testdb` with `test_engine`
56
async with test_engine.begin() as conn:
57
- await conn.execute(text("COMMIT")) # Ensure we're not in a transaction
+
58
await conn.run_sync(_create_db_schema)
59
await conn.run_sync(Base.metadata.drop_all)
60
await conn.run_sync(Base.metadata.create_all)
0 commit comments