pytest-plus
PyTest Plus Plugin :: extends pytest functionality
What it is and what it does
pytest-plus is a pytest plugin that bundles several optional safety and CI-integration features designed to catch common testing mistakes and improve test reproducibility. It enforces that test function names are unique across a project, validates test IDs to ensure they contain only safe characters and stay within a reasonable length, and allows you to pin the exact number of tests that should pass in CI via the PYTEST_REQPASS environment variable—preventing accidental test skipping. It also collects pytest log files into a project-accessible directory for CI artifact collection.
The plugin is designed to degrade gracefully: if you remove it, your tests continue to run normally. Most of its checks can be disabled via environment variables (PYTEST_CHECK_TEST_DUPLICATE, PYTEST_CHECK_TEST_ID_REGEX, PYTEST_MAX_TEST_ID_LENGTH), making it flexible for different project needs. It targets CI workflows and development practices where catching test-naming collisions and ensuring test counts remain stable are valuable safeguards.
Use it for:
- Enforce exact test counts in CI pipelines to catch accidental test skipping or disabling.
- Prevent duplicate test function names across a project to make failed tests easier to reproduce locally.
- Validate test IDs to ensure they can be safely copy-pasted from CI logs into a terminal.
- Collect pytest logs from temporary directories into a project-accessible location for CI artifact archival.
- Add optional pytest safety checks without breaking existing test infrastructure if the plugin is later removed.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that adds optional test-count validation, duplicate test-name detection, test-ID safety checks, and CI log collection to help catch common testing issues.
Yes, if you run tests in CI and want to catch test-naming collisions or accidental test skipping. The plugin is low-friction, permissively licensed, and gracefully degrades if removed. However, maintenance is aging (558 days since last release), so evaluate whether the specific checks it offers match your project's needs before adopting it as a critical CI dependency.
Install
pytest-plus on PyPI
pip
pip install pytest-plusuv
uv add pytest-pluspoetry
poetry add pytest-plusInstalling pytest-plus
Before you install
Low install friction with a single runtime dependency on pytest. Maintenance status is aging—last release was 558 days ago and the repository shows minimal activity (12 stars), though it remains active and not archived.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install pytest-plus
# In your test environment, set environment variable:
export PYTEST_REQPASS=123
# Then run pytest normally:
pytest
Requires Python 3.10 or later; plugin gracefully downgrades if removed, so no hard runtime dependency beyond pytest itself.
Verify before relying
- Whether the duplicate test-name check works across all project structures or has known edge cases.
- Performance impact of test-ID regex validation on large test suites.
- Compatibility with pytest plugins that also modify test collection or reporting.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pytest |
| Maintenance | aging — 558 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 77,583/month — #14,512 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_plus-0.8.1-py3-none-any.whl
Keywords: testing, pytest, plugin
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-error-for-skipsA pytest plugin that converts skipped tests…
permissive · top 15,000 on PyPI
pytest-repeatA pytest plugin that repeats test execution a…
copyleft · top 5,000 on PyPI
pytest-deadfixturesA pytest plugin that identifies unused and…
permissive · top 5,000 on PyPI
pytest-custom-exit-codeA pytest plugin that lets you customize the…
permissive · top 5,000 on PyPI
pytest-replayA pytest plugin that records test execution…
permissive · top 15,000 on PyPI
pytest-flakefinderA pytest plugin that runs tests multiple times…
permissive · top 5,000 on PyPI
pytest-progressA pytest plugin that displays real-time test…
permissive · top 15,000 on PyPI
pytest-find-dependenciesA pytest plugin that identifies dependencies…
permissive · top 5,000 on PyPI
pytest-xmlA pytest plugin that generates XML output from…
unclear · top 15,000 on PyPI