Make narrowed backend test runs and the quarantine test order- and load-proof
The session db fixture now disposes the engine before deleting the file, since a module under a no-op db (tests/sdk, tests/flow) may have connected first; the sdk import tests forget the study packages they import; the supervision tests keep the real quarantine length so it cannot expire mid-assertion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013GAeg4Jo6xjZzjwy9QDWMQ
This commit is contained in:
@@ -50,6 +50,9 @@ def db() -> Generator[Session, None, None]:
|
||||
assert url.database and url.database.endswith("_test.db"), url.database
|
||||
|
||||
path = Path(url.database)
|
||||
# A module that ran before this fixture (one under a no-op `db`) may have
|
||||
# connected already; a pooled connection would keep the unlinked file.
|
||||
engine.dispose()
|
||||
path.unlink(missing_ok=True)
|
||||
# The real path, so the suite runs against a database built the way a
|
||||
# deployment's is — including the alembic stamp the app's own startup
|
||||
|
||||
Reference in New Issue
Block a user