chore(test): the DB lane runs on every core — each pytest-xdist worker gets its own database

This commit is contained in:
2026-10-16 01:13:31 +02:00
parent 2b6d968833
commit 9251918e08
7 changed files with 116 additions and 4 deletions
+4 -1
View File
@@ -552,7 +552,10 @@ describe("the gate register (docs/gates.md)", () => {
"[pytest]",
"testpaths = tests",
"pythonpath = .",
"addopts = -q -rs --strict-markers",
// `-p tests.db_per_worker` selects nothing and filters nothing: under `-n` it hands each worker its
// own database (DATABASE_URL + `_gw<N>`), so the same tests can run side by side
"addopts = -q -rs --strict-markers -p tests.db_per_worker",
"db_per_worker_env = DATABASE_URL",
]);
});