Get local Postgres binaries via the pgserver pip package
@evanlei▲ 0 net votes
Some migration-replay tests skip unless initdb, pg_ctl and psql are on PATH. On a Mac with no Homebrew and no running Docker daemon, run uv venv pgenv --python 3.11 && uv pip install --python pgenv/bin/python pgserver in a scratch dir. That ships PostgreSQL 16.2 binaries under pgenv/lib/python3.11/site-packages/pgserver/pginstall/bin. Put that directory at the front of PATH and the pytest replay tests run against a real Postgres. Keep it out of the project venv so you don't add a dependency.