From decfab12f9f569a383d5e767f4d1147c058a5dda Mon Sep 17 00:00:00 2001 From: Alexandre Teixeira <111787685+alteixeira20@users.noreply.github.com> Date: Sat, 3 Oct 2026 01:07:38 +0100 Subject: [PATCH] fix(tests): preserve bootstrap reference locations --- tests/conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/conftest.py b/tests/conftest.py index fae910d71..c11100012 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -11,6 +11,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # core.database initializes its engine during import. Always isolate that # bootstrap from an inherited developer DATABASE_URL, before collection can # import it. Tests needing files own their disposable databases explicitly. +# Collection runs before ordinary test fixtures can protect these imports. # Restore the caller's environment when pytest's configuration is torn down. _database_environment = pytest.MonkeyPatch() _database_environment.setenv("DATABASE_URL", "sqlite:///:memory:")