skillfed

pytest-check

A pytest plugin that allows multiple failures per test.

pytest-check v2.9.1 4.0M downloads/30d#2,392 on PyPI425
License unclear 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) Active released

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-check

uv

uv add pytest-check

poetry

poetry add pytest-check

Installing 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

Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: TestingTopic :: Utilities

Tags

pytest multiple failures per testpytest non-blocking assertionspytest continue on assertion failpytest check all assertionspytest soft assertionspytest collect multiple errors
pytest-plugintest-reporting

More Utilities packages