Commit 1290dc2
test(procrastinate): skip apply_schema when schema already exists
apply_schema is NOT idempotent — procrastinate's schema.sql uses bare
CREATE TYPE/CREATE TABLE, so re-running blows up with DuplicateObject
on the second invocation (whether across tests in one run or across
runs against a persistent DB).
Split into two fixtures: a session-scoped _schema that does a one-time
existence check + conditional apply, and the existing function-scoped
app that opens/closes a fresh App per test.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f0917a6 commit 1290dc2
1 file changed
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
39 | 53 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
43 | 57 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
47 | 61 | | |
48 | 62 | | |
49 | 63 | | |
50 | | - | |
51 | 64 | | |
52 | 65 | | |
53 | 66 | | |
| |||
0 commit comments