pytest-check
A pytest plugin that allows multiple failures per test.
What it is and what it does
pytest-check is a pytest plugin that changes how assertion failures are handled within a test function. Normally, a test stops at the first failed assertion. This plugin allows you to wrap assertions in a `with check:` block (or use its helper functions like `check.equal()`) so that failures are recorded but execution continues, letting you see all the problems in one test run instead of fixing them one at a time.
The plugin provides both a context-manager interface and a set of built-in validation functions covering common comparisons (equality, identity, containment, type checks, numeric comparisons, NaN checks, and approximate equality). You can also decorate your own helper functions with `@check.check_func` to turn them into non-blocking checks, or use `check.fail()` for custom failure reporting. It includes a `check.raises()` context manager for non-blocking exception testing.
Use it for:
- Validate multiple properties of an HTTP response (status code, headers, body content) without stopping at the first failure.
- Check all fields in a parsed data structure or API response in a single test run.
- Run a loop of similar checks (e.g., validating multiple items) and collect all failures before reporting.
- Test configuration or setup code where you want to verify all invariants hold, not just the first one.
- Regression testing where you want a comprehensive view of what broke across multiple assertions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that allows tests to continue running and collect multiple assertion failures per test, rather than stopping at the first failed assert.
Yes. The plugin solves a real testing problem—seeing all failures at once rather than fixing them iteratively—with low install friction, active maintenance, no known vulnerabilities, and a permissive MIT license. It integrates cleanly with pytest and requires only common dependencies. Suitable for any test suite where comprehensive failure reporting per test is valuable.
Install
pytest-check on PyPI
pip
pip install pytest-checkuv
uv add pytest-checkpoetry
poetry add pytest-checkInstalling pytest-check
Before you install
Low install friction with a pure-Python wheel and only three runtime dependencies (pytest, packaging, typing-extensions). Actively maintained with a recent release.
License in practice
MIT license permits commercial and private use with minimal restrictions; attribution required.
Quickstart
pip install pytest-check
from pytest_check import check
def test_example():
with check:
assert 1 == 1
with check:
assert 2 == 2
Requires pytest to be installed; Python 3.9 or later.
Verify before relying
- Whether the plugin works with pytest fixtures and parametrization patterns beyond the documented examples.
- Performance impact when running hundreds or thousands of checks in a single test.
Package facts
| License | The MIT License (MIT) Copyright (c) 2015, Brian Okken Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (unclear) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — packaging, pytest, typing-extensions |
| Maintenance | actively maintained — 13 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,041,371/month — #2,392 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_check-2.9.1-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytest-assumeA pytest plugin that collects and reports…
permissive · top 15,000 on PyPI
pytest-runtime-xfailA pytest plugin that provides a `runtime_xfail`…
permissive · top 15,000 on PyPI
softestSoftest extends unittest.TestCase to allow…
unclear · top 15,000 on PyPI
pytest-rerunfailuresA pytest plugin that automatically reruns…
copyleft · top 1,000 on PyPI
pytest-github-actions-annotate-failuresA pytest plugin that automatically annotates…
permissive · top 5,000 on PyPI
pytest-deepassertA pytest plugin that replaces standard…
permissive · top 15,000 on PyPI
pytest-raisesProvides pytest markers (@pytest.mark.raises…
unclear · top 15,000 on PyPI
re-assertProvides a helper class for regex assertions…
permissive · top 15,000 on PyPI
pytest-prettyA pytest plugin that formats test output with…
permissive · top 5,000 on PyPI
pytest-cacheA pytest plugin that persists test state across…
permissive · top 15,000 on PyPI