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.1.zip (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_cpp-0.4.1-py2.py3-none-any.whl (10.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pytest-cpp-0.4.1.zip.

File metadata

  • Download URL: pytest-cpp-0.4.1.zip
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pytest-cpp-0.4.1.zip
Algorithm Hash digest
SHA256 affa4d5f576def8fdb47f079ddcb45c79befa854f530757749210e83f84b242d
MD5 06ce9ceb018952edadcd887ff69dd3a3
BLAKE2b-256 108bb714c117ef9a87a1971702fa887f7f5fbfb6942976c5e1aa19ba9abed07f

See more details on using hashes here.

File details

Details for the file pytest_cpp-0.4.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_cpp-0.4.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eaef8f486938b237651c0141f501b69f993c504ca0e16dac48fccd71da4e8823
MD5 851f4fda77112362d8f6907d07517ac4
BLAKE2b-256 158d2862c509e0aca1983d4e9f81c0b792dff1820058644047ba0c0c5f829cc0

See more details on using hashes here.

Supported by

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