pytest-databases

Installation
SKILL.md

pytest-databases

pytest-databases provides session-scoped, container-backed service fixtures. This guidance targets the immutable v0.19.0 tag. Load only the plugin modules the test suite uses. Consume a ready client fixture where one exists; otherwise connect with the client already used by the project.

Code Style Rules

  • Keep database I/O consistent with the project driver. The package's PostgreSQL connection fixtures use synchronous psycopg; do not await their methods.
  • Type service fixtures with the service class from the same plugin module.
  • Prefer ready client fixtures when provided. For service-only plugins, build the project's existing client from the service object's host, port, and credentials.
  • Keep plugin declarations in the nearest conftest.py; do not load every backend globally.
Installs
9
GitHub Stars
13
First Seen
May 18, 2026
pytest-databases — litestar-org/litestar-skills