skillfed

pytest-plus

PyTest Plus Plugin :: extends pytest functionality

pytest-plus v0.8.1 77.6K downloads/30d#14,512 on PyPI12
Permissive license MIT AGING released

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

uv

uv add pytest-plus

poetry

poetry add pytest-plus

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: PytestIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: System :: Systems AdministrationTopic :: Utilities

Tags

pytest plugin extensionstest count validationduplicate test namespytest CI helperstest ID validationpytest log collection
pytest-pluginci-testingtest-validation

More Utilities packages