pytest-assume
A pytest plugin that allows multiple failures per test
What it is and what it does
pytest-assume is a pytest plugin that changes how test failures are reported. Instead of stopping at the first failed assertion, it collects all assumption failures in a test and reports them together at the end. This is useful when you want to see all the ways a test failed in one run, rather than fixing one assertion and re-running to find the next.
The plugin provides a `pytest.assume()` function that can wrap assertions or be used as a context manager around plain assertions. It depends on pytest and six, and has low install friction. However, the project has been abandoned since mid-2023 with no recent maintenance, so compatibility with the latest pytest versions is not guaranteed.
Use it for:
- Batch-checking multiple related conditions in a parametrized test without stopping at the first failure
- Validating all fields of a complex object in a single test run to see all validation errors at once
- Running data-driven tests where you want to collect all assertion failures across multiple parameter sets before stopping
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that collects and reports multiple assertion failures within a single test, rather than stopping at the first failure.
Yes, if you need to collect multiple failures per test and are comfortable with an abandoned project. The feature is straightforward and has no known vulnerabilities, but verify compatibility with your pytest version before relying on it in production. Consider maintaining a fork if you need ongoing support.
Install
pytest-assume on PyPI
pip
pip install pytest-assumeuv
uv add pytest-assumepoetry
poetry add pytest-assumeInstalling pytest-assume
Before you install
Low install friction with only pytest and six as runtime dependencies. However, the project is abandoned—last release was 2021-06-24 and last commit 2023-05-09, with no active maintenance. Use only if the feature set meets your needs and you're comfortable maintaining a fork if issues arise.
License in practice
MIT license is permissive and places no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install pytest-assume
import pytest
def test_multiple_checks():
pytest.assume(1 == 1)
pytest.assume(2 == 2)
pytest.assume(3 == 4) # fails but test continues
Verify before relying
- Compatibility with recent pytest versions (latest release predates current pytest major versions)
- Whether the plugin works correctly with modern Python versions and pytest fixtures
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pytest, six |
| Maintenance | abandoned — 1,877 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 789,545/month — #5,054 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_assume-2.4.3-py3-none-any.whl
Keywords: testing, pytest, assert
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pytest-checkA pytest plugin that allows tests to continue…
unclear · top 5,000 on PyPI
pytest-deepassertA pytest plugin that replaces standard…
permissive · top 15,000 on PyPI
pytest-reraiseCaptures exceptions raised in threads during…
permissive · top 15,000 on PyPI
re-assertProvides a helper class for regex assertions…
permissive · top 15,000 on PyPI
pytest-subtestsAdds subTest() support to pytest, allowing…
permissive · top 5,000 on PyPI
softestSoftest extends unittest.TestCase to allow…
unclear · top 15,000 on PyPI
delayed-assertCollects multiple assertion failures in a test…
unclear · top 15,000 on PyPI
assertsProvides stand-alone assertion functions for…
unclear · top 15,000 on PyPI
pytest-cacheA pytest plugin that persists test state across…
permissive · top 15,000 on PyPI
pytest-retrypytest-retry is a pytest plugin that…
permissive · top 5,000 on PyPI