pytest-databases

Provide pytest fixtures for Dockerized database instances in integration tests.

15|4|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/cofin/flow --skill pytest-databases
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytest-databases
Source: https://github.com/cofin/flow/tree/main/skills/pytest-databases
Command: npx skills add https://github.com/cofin/flow --skill pytest-databases

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies database integration testing in Python projects by providing ready-to-use fixtures for various databases within a pytest environment.

Core Features & Use Cases

  • Database Fixtures: Offers pre-configured fixtures for PostgreSQL, MySQL, MariaDB, Oracle, Redis, and more.
  • Docker Integration: Leverages Docker containers for isolated and reproducible database environments during tests.
  • Use Case: When writing tests for a web application that uses PostgreSQL, use this Skill to automatically spin up a temporary PostgreSQL instance, allowing your tests to interact with a real database without manual setup.

Quick Start

Use the pytest-databases skill to add PostgreSQL testing fixtures to your conftest.py file.

Frequently Asked Questions about pytest-databases

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up database fixtures for pytest integration testing?

To set up database fixtures for pytest integration testing, you use a pytest plugin that provides pre-configured fixtures for Dockerized database instances, enabling isolated test environments without manual setup.

Can I use pytest fixtures to test against a real PostgreSQL database?

Yes, you can use pytest fixtures to test against a real PostgreSQL database by automatically spinning up a temporary Docker container for your tests, simplifying test environment configuration.

Does this database testing approach support MySQL, MariaDB, and Redis?

Yes, this database testing approach supports MySQL, MariaDB, and Redis, alongside PostgreSQL and Oracle, by leveraging Docker containers to provide isolated and reproducible database environments during tests.

What is the best way to manage Docker database containers for pytest?

The best way to manage Docker database containers for pytest is using a dedicated pytest plugin architecture that handles setting up and tearing down instances, ensuring reproducible database testing environments.

Do I need Docker to run integration tests with database fixtures?

Yes, you need Docker to run integration tests with these database fixtures, as the plugin leverages Docker containers to create isolated and reproducible database environments for your test suite.