$npx skillfedfor your agent

pytest-cpp

Use pytest's runner to discover and execute C++ tests

Worth itPyPI TestingReleased Sep 2024277.3K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_cpp-2.6.0-py3-none-any.whl
v2.6.0 · released 2024-09-18 · Python >=3.8 · 1 runtime deps: pytest

Yes. If you maintain a multi-language project with C++ and Python tests, this plugin eliminates the need for separate test runners and reporting pipelines. It has low install friction, active maintenance, no known vulnerabilities, and a permissive MIT license. The only prerequisite is having compiled C++ test binaries; the plugin does not compile code itself.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires compiled C++ test executables matching the naming pattern test_* or *_test to be present in the project; the plugin does not compile C++ code itself.
  • Low friction: pure Python wheel with only pytest as a runtime dependency.
  • Actively maintained with recent commits and stable production status.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use this in commercial and proprietary projects with minimal restrictions beyond retaining the license notice.

last release 2024-09-18 (695 days) · last repo commit 2026-08-03 · 147 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 277,298 downloads/mo, #8,148 on PyPI

Verify before relying

pip install pytest-cpp

Then run:
pytest

The plugin automatically detects and executes C++ test binaries (Google Test, Boost.Test, Catch2) in your project directory.
  • Whether the plugin works with C++ test frameworks beyond Google Test, Boost.Test, and Catch2.
  • Performance characteristics when running large numbers of C++ tests in parallel with pytest-xdist.
  • Compatibility with recent versions of Google Test, Boost.Test, and Catch2 frameworks.
Same gist for agents: .md · .json

What it is and what it does

pytest-cpp is a pytest plugin that bridges Python's test runner with C++ test frameworks, allowing you to discover and execute C++ tests using pytest's command-line interface and reporting tools. It automatically detects test binaries built with Google Test, Boost.Test, or Catch2, and integrates them into your pytest workflow.

The plugin lets you run mixed Python and C++ test suites with a single pytest command, apply pytest's standard filtering (like -k for keyword matching), generate unified JUnit XML reports, and parallelize C++ test execution using pytest-xdist. It supports configuration options for specifying which files to test, passing arguments to C++ test binaries, and wrapping test execution with tools like valgrind or emulators for cross-compilation scenarios.

Use it for

  • Run all tests in a multi-language project (Python and C++) with one pytest command.
  • Generate a single JUnit XML report combining results from both Python and C++ test suites.
  • Parallelize C++ test execution across multiple cores using pytest-xdist.
  • Filter and select which C++ tests to run using pytest's standard -k keyword matching.
  • Wrap C++ test execution with memory checkers (valgrind) or emulators (qemu) for testing in non-native environments.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

If you maintain a multi-language project with C++ and Python tests, this plugin eliminates the need for separate test runners and reporting pipelines. It has low install friction, active maintenance, no known vulnerabilities, and a permissive MIT license. The only prerequisite is having compiled C++ test binaries; the plugin does not compile code itself.

Install

pytest-cpp on PyPI

Before you install

Low friction: pure Python wheel with only pytest as a runtime dependency. Actively maintained with recent commits and stable production status.

Requires compiled C++ test executables matching the naming pattern test_* or *_test to be present in the project; the plugin does not compile C++ code itself.

License in practice

MIT license is permissive; you can use this in commercial and proprietary projects with minimal restrictions beyond retaining the license notice.

Quickstart

pip install pytest-cpp

Then run:
pytest

The plugin automatically detects and executes C++ test binaries (Google Test, Boost.Test, Catch2) in your project directory.

Verify before relying

  • Whether the plugin works with C++ test frameworks beyond Google Test, Boost.Test, and Catch2.
  • Performance characteristics when running large numbers of C++ tests in parallel with pytest-xdist.
  • Compatibility with recent versions of Google Test, Boost.Test, and Catch2 frameworks.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
pytest
MaintenanceActively maintained 695 days since the last release
Last repo commit
First released
Downloads277,298 / month, #8,148 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: C++Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Quality AssuranceTopic :: Software Development :: Testing

Evidence: pytest_cpp-2.6.0-py3-none-any.whl

Tags

Capabilities
pytest C++ test runnerC++ test discovery pytestGoogle Test pytest integrationCatch2 pytest pluginmulti-language test executionC++ Boost.Test pytestunified test reporting C++
Topics
c++-testingmulti-language-projectstest-integration
PyPI keywords
pytesttestunittest

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “C++ test discovery pytest”

  • pytest-cppA pytest plugin that discovers and runs C++ tests from Google Test,…
  • rtestA Python test runner built in Rust that uses static AST analysis for…
  • pytest-cmakeIntegrates Pytest with CMake build systems, enabling automatic…

Give your agent the search over MCP, or paste the wish link into any chat.

More Testing packages

pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo
virtualenv Worth it
PyPI · Libraries · released Aug 2026

virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.

MITpure Python · 3.9+
532.9Mdownloads / mo
coverage Worth it
PyPI · Testing · released Aug 2026

Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.

Install it if you want to measure test completeness or enforce coverage thresholds in your project.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
pytest-asyncio Worth it
PyPI · Testing · released May 2026

pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.

Install it if you write tests for any asyncio-based code.

Apache-2.0pure Python · 3.10+
275.9Mdownloads / mo
pytest-json-ctrf Worth it
PyPI · Testing · released Jul 2026

A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.

Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.

MITpure Python · 3.8+
273.0Mdownloads / mo

See also pytest-selenium · pytest-parallel · pytest-odoo · pytest-run-parallel · pytest-django · pytest-cov · pytest-incremental · pytest-logging · tdd-guard-pytest · pytest-slack