Skip to main content

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

Project description

Use pytest runner to discover and execute C++ tests.

Supported Python versions version downloads ci coverage

Supports both Google Test and Boost::Test:

https://raw.githubusercontent.com/pytest-dev/pytest-cpp/master/images/screenshot.png

This brings several benefits:

  • Allows you to run all your tests in multi-language projects with a single command;

  • Execute C++ tests in parallel using pytest-xdist plugin;

  • Use --junitxml option to produce a single and uniform xml file with all your test suite results;

  • Filter which tests to run using standard test filtering capabilities, such as by file names, directories, keywords by using the -k option, etc.;

Usage

Once installed, when py.test runs it will search and run tests founds in executable files, detecting if the suites are Google or Boost tests automatically.

You can configure which files are tested for suites by using the cpp_files ini configuration:

[pytest]
cpp_files=test_suite*

By default matches test_* and *_test executable files.

Requirements

  • Python 2.7+, Python 3.4+

  • pytest

Install

Install using pip:

$ pip install pytest-cpp

Changelog

Please consult CHANGELOG.

Support

All feature requests and bugs are welcome, so please make sure to add feature requests and bugs to the issues page!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-cpp-0.4.2.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

pytest_cpp-0.4.2-py2.py3-none-any.whl (10.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page