Skip to content

Commit 49b0bfc

Browse files
fix(root): dispose api test engine after pytest session
Dispose the async SQLAlchemy engine at test-session teardown so apps/api:test exits cleanly after pytest finishes. Co-Authored-By: First Fluke <our.first.fluke@gmail.com>
1 parent cf28862 commit 49b0bfc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

apps/api/tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@ def client() -> Iterator[TestClient]:
4545
def cleanup_test_database() -> Iterator[None]:
4646
"""Remove the process-local SQLite file after the test session."""
4747
yield
48+
asyncio.run(engine.dispose())
4849
if TEST_DB_PATH.exists():
4950
TEST_DB_PATH.unlink()

0 commit comments

Comments
 (0)