mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-07 14:37:55 +00:00
fix(tests): preserve bootstrap reference locations
This commit is contained in:
parent
9fd6919ee9
commit
decfab12f9
1 changed files with 1 additions and 0 deletions
|
|
@ -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:")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue