pytest-reverse
Pytest plugin to reverse test order.
Decision gist · record as of 2026-08-14
Yes. Low install friction, no security issues, actively maintained, and a focused tool that solves a real problem in test reliability. Useful for any project where test ordering might mask failures or dependencies.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low friction: pure Python wheel with only pytest as a runtime dependency.
- Actively maintained with recent releases; last commit 2026-08-13.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal obligations.
last release 2025-09-09 (339 days) · last repo commit 2026-08-13 · 29 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 74,991 downloads/mo, #14,761 on PyPI
Alternatives
Verify before relying
pip install pytest-reverse
pytest --reverse- Whether test reversal alone is sufficient to catch all ordering-dependent failures or if it works best combined with other techniques.
- Performance impact when reversing large test suites.
What it is and what it does
pytest-reverse is a pytest plugin that reverses the order in which tests are executed. It works by adding a --reverse flag to pytest, allowing you to run your test suite backwards instead of in the default or randomized order. The plugin is automatically discovered by pytest once installed.
Test reversal helps identify tests that depend on execution order or shared state—a common source of flaky tests and false positives. By running tests in reverse, you can detect whether a passing test only passes because an earlier test set up some state, or whether a test fails only when preceded by a specific other test. This is a lightweight alternative to full randomization for uncovering test isolation issues.
Use it for
- Run your test suite backwards to catch tests that pass only due to side effects from earlier tests.
- Debug flaky tests by checking if they fail when executed in reverse order.
- Add --reverse to pytest.ini to make reverse execution the default for your project.
- Verify test independence before committing code that modifies test fixtures or setup.
- Complement randomized testing strategies with a deterministic reverse run.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, no security issues, actively maintained, and a focused tool that solves a real problem in test reliability. Useful for any project where test ordering might mask failures or dependencies.
Install
pytest-reverse on PyPI
Before you install
Low friction: pure Python wheel with only pytest as a runtime dependency. Actively maintained with recent releases; last commit 2026-08-13.
Requires Python 3.9 or later.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal obligations.
Quickstart
pip install pytest-reverse
pytest --reverse
Verify before relying
- Whether test reversal alone is sufficient to catch all ordering-dependent failures or if it works best combined with other techniques.
- Performance impact when reversing large test suites.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepytest |
| Maintenance | Actively maintained 339 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 74,991 / month, #14,761 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 :: DevelopersNatural Language :: EnglishProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Typing :: Typed |
Evidence: pytest_reverse-1.9.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 › “pytest reverse test order”
- pytest-reverseA pytest plugin that runs tests in reverse order to detect test…
- pytest-find-dependenciesA pytest plugin that identifies dependencies between tests by running…
- pytest-orderingA pytest plugin that lets you control the execution order of your…
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-randomly · pytest-find-dependencies · pytest-random-order · pytest-socket · pytest-order · pytest-incremental · pytest-depends · pytest-split · pytest-spec