A pytest plugin providing fixtures and helpers for integration testing with PostgreSQL databases. Version 1.1.2 supports creating temporary test databases, managing database sessions, and rolling back transactions. Release cadence is sporadic.
pip install pytest-pgsqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Use the `pgsql` fixture to get a connection to a temporary test database. The fixture creates a fresh database for each test.
Update your requirements to `pytest-pgsql` and change imports from `pytest_postgresql` to `pytest_pgsql`.
Use `pgsql['conn']` to get the connection, not `pgsql` alone if you expect a connection object.
Replace `pgsql_session` with `pgsql` and manage transactions explicitly or use `pgsql_transaction`.