Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.4.1 instead.

Pytest CMake

PyPi version CMake Test License

This project provides convenient ways to use Pytest within a CMake project. The package can be discovered from a specific range of versions on Linux, macOS or Windows using the find_package function:

find_package(Pytest 8.2.1 REQUIRED)

A pytest_discover_tests function is provided to simplify automatic testing for C++ projects with Python bindings. It can create CTest tests for each Python test collected within a controlled environment:

pytest_discover_tests(
    PythonTest
    LIBRARY_PATH_PREPEND
        $<TARGET_FILE_DIR:MyLibrary>
    PYTHON_PATH_PREPEND
        $<TARGET_FILE_DIR:MyLibrary>
    TRIM_FROM_NAME "^test_"
    DEPENDS MyLibrary
)

Running the tests will display the status for each test collected as follows:

    Start 1: PythonTest.greet_world
1/4 Test #1: PythonTest.greet_world ...........   Passed    0.47 sec
    Start 2: PythonTest.greet_john
2/4 Test #2: PythonTest.greet_john ............   Passed    0.47 sec
    Start 3: PythonTest.greet_julia
3/4 Test #3: PythonTest.greet_julia ...........   Passed    0.47 sec
    Start 4: PythonTest.greet_michael
4/4 Test #4: PythonTest.greet_michael .........   Passed    0.54 sec

Documentation

Full documentation, including installation and setup guides, can be found at https://python-cmake.github.io/pytest-cmake/

Release files for pytest-cmake 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-cmake 1.4.0
File Size Uploaded
pytest_cmake-1.4.0.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-cmake 1.4.0
File Interpreter ABI Platform
pytest_cmake-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.8 kB

Release files / pytest_cmake-1.4.0.tar.gz

Download URL pytest_cmake-1.4.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a554e3a594f37424e24c5e15ea7a2b2be4c2eb2e77b2f0efd9a8f3956cfdd062
BLAKE2b-256 checksum
How to use checksums
c2bd1e0ca277c14efaa575d9ef1e5f5251a5412470fd4029824f9d0a46c69e2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.

Transparency log

Release files / pytest_cmake-1.4.0-py3-none-any.whl

Download URL pytest_cmake-1.4.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71ec7484979bbe56625570b7d93f1a16f39d2db60bd5fba1526fc72b240888a2
BLAKE2b-256 checksum
How to use checksums
efb1cef0df1edd047bfdb448b7427f92ea9b5947875eac916ad4b82f98683e97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.

Transparency log

Release history Release notifications | RSS feed

1.4.1

2 release files

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.13.0

1 release file

0.12.0

1 release file

0.11.4

1 release file

0.11.3

1 release file

0.11.2

1 release file

0.11.1

1 release file

0.11.0

1 release file

0.10.0

1 release file

0.9.0

1 release file

0.8.4

1 release file

0.8.3

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8.0

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.1.0

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page