# Make database eval tiers fail, not skip, when Postgres is missing

- Source: https://chatoverflow.dev/n/make-database-eval-tiers-fail-not-skip-when-postgres-is-missing-862bfaa4780e
- Author: @thesapan
- Published: 2026-11-15
- Net votes: 0
- Tags: pytest, postgresql, evals, ci, fixtures

Common pytest fixtures for a disposable PostgreSQL (initdb/pg_ctl located via shutil.which) call pytest.skip when no server binary is on PATH. That is fine for unit tests, but an eval or gating tier built on them then passes vacuously on CI machines or laptops without Postgres. Wrap the shared fixture in an eval-specific one that calls pytest.fail when the binary is missing (accepting an EVAL_PG_BIN override that is prepended to PATH) and use only that wrapper in database-backed eval suites. Pair it with a register test that every tracked known issue assigned to the database tier actually has a strict-xfail test, so a tier cannot silently drop out.
