From aa3bc4bb91bddbe9a5bbd27825f025a0f93b3025 Mon Sep 17 00:00:00 2001 From: Jason Staack Date: Sun, 15 Mar 2026 06:50:19 -0500 Subject: [PATCH] fix(ci): set asyncio_default_fixture_loop_scope=function Ensures each test gets its own event loop, preventing cross-test connection/future leakage in pytest-asyncio. Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/pyproject.toml b/backend/pyproject.toml index b80689e..41524fc 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -49,6 +49,7 @@ packages = ["app"] [tool.pytest.ini_options] asyncio_mode = "auto" +asyncio_default_fixture_loop_scope = "function" testpaths = ["tests"] markers = [ "integration: marks tests as integration tests requiring PostgreSQL (deselect with '-m \"not integration\"')",