pytest-regressions
Easy to use fixtures to write regression tests.
Decision gist · record as of 2026-08-14
Yes. Low install friction, active maintenance, no known vulnerabilities, and permissive MIT license. The plugin solves a real testing problem—baseline comparison—that would otherwise require boilerplate assertion code. Suitable for any project using pytest that needs to validate complex or binary outputs.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction install with three lightweight runtime dependencies (pytest, pytest-datadir, pyyaml).
- Active maintenance: last commit 2026-07-27, release 81 days ago.
License · maintenance · safety
MIT (permissive) — MIT license (permissive): you can use this freely in commercial and private projects without restriction or attribution requirement.
last release 2026-05-25 (81 days) · last repo commit 2026-07-27 · 221 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,026,806 downloads/mo, #4,477 on PyPI
Alternatives
Verify before relying
pip install pytest-regressions
# In your test file:
import pytest
def test_output(data_regression):
result = some_function()
data_regression.check(result)- Exact API surface and supported data types (text, images, files, numeric tables) beyond the description excerpt.
- How baseline data is stored and managed in the data directory structure.
- Whether image comparison includes pixel-level tolerance or only exact matching.
What it is and what it does
pytest-regressions is a pytest plugin that simplifies writing regression tests by automating the comparison of test output against saved baseline data. Instead of manually writing assertions for complex outputs, you save the expected result once and the fixture automatically verifies that future test runs produce identical data. It handles general data, images, files, and numeric tables through a unified interface.
The plugin integrates with pytest-datadir to manage baseline data files in a dedicated directory structure. When a test runs, the fixture compares the current output to the stored baseline; on first run or when you intentionally update baselines, it saves the new data. This approach is particularly useful for testing functions that produce complex, multi-line, or binary output where manual assertion writing would be tedious or error-prone.
Use it for
- Verify that refactored code produces identical output to the original implementation.
- Test image generation or rendering by comparing pixel data against saved reference images.
- Validate formatted reports, logs, or structured text output remains unchanged across releases.
- Regression-test numeric computation results (tables, matrices) against known-good baselines.
- Detect unintended changes in file generation or serialization behavior.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, active maintenance, no known vulnerabilities, and permissive MIT license. The plugin solves a real testing problem—baseline comparison—that would otherwise require boilerplate assertion code. Suitable for any project using pytest that needs to validate complex or binary outputs.
Install
pytest-regressions on PyPI
Before you install
Low friction install with three lightweight runtime dependencies (pytest, pytest-datadir, pyyaml). Active maintenance: last commit 2026-07-27, release 81 days ago.
Requires Python 3.10 or later.
License in practice
MIT license (permissive): you can use this freely in commercial and private projects without restriction or attribution requirement.
Quickstart
pip install pytest-regressions
# In your test file:
import pytest
def test_output(data_regression):
result = some_function()
data_regression.check(result)
Verify before relying
- Exact API surface and supported data types (text, images, files, numeric tables) beyond the description excerpt.
- How baseline data is stored and managed in the data directory structure.
- Whether image comparison includes pixel-level tolerance or only exact matching.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagespytest-datadirpytestpyyaml |
| Maintenance | Actively maintained 81 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,026,806 / month, #4,477 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Testing |
Evidence: pytest_regressions-2.11.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “baseline comparison testing”
- pytest-regressionsProvides pytest fixtures for writing regression tests that compare…
- percy-seleniumIntegrates Percy visual testing into Python Selenium tests, capturing…
- pytest-textual-snapshotA pytest plugin that captures SVG screenshots of Textual terminal…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also pytest-datadir · pytest-datafiles · pytest-homeassistant-custom-component · pytest-mpl · pytest-snapshot · pytest-localftpserver · pytest-variables · pytest-arraydiff · pytest-rich · pytest-item-dict