--- id: pytest-check version: "2.9.1" 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) license_treatment: unclear maintenance: active --- # pytest-check — A pytest plugin that allows multiple failures per test. License: unclear · Maintenance: active · Downloads: 4.0M/mo ## 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 above — 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 pip install pytest-check uv add pytest-check 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_current - Install friction: low - Maintenance: active - Downloads: 4.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest multiple failures per test, pytest non-blocking assertions, pytest continue on assertion fail, pytest check all assertions, pytest soft assertions, pytest collect multiple errors, pytest-plugin, test-reporting [View on SkillFed](https://skillfed.io/packages/pytest-check) · [View on PyPI](https://pypi.org/project/pytest-check/)