{"id":37061627,"url":"https://github.com/python-cmake/pytest-cmake","last_synced_at":"2026-01-14T07:00:06.298Z","repository":{"id":80098833,"uuid":"567099242","full_name":"python-cmake/pytest-cmake","owner":"python-cmake","description":"Pytest module for CMake","archived":false,"fork":false,"pushed_at":"2025-08-10T18:49:39.000Z","size":104,"stargazers_count":29,"open_issues_count":4,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-10T19:29:25.489Z","etag":null,"topics":["cmake","development","pytest","python"],"latest_commit_sha":null,"homepage":"https://python-cmake.github.io/pytest-cmake/","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/python-cmake.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-11-17T04:04:43.000Z","updated_at":"2025-02-17T00:31:02.000Z","dependencies_parsed_at":"2024-03-17T19:24:07.680Z","dependency_job_id":"81c35792-8d48-4f35-ba5a-5accf2866a85","html_url":"https://github.com/python-cmake/pytest-cmake","commit_stats":null,"previous_names":["python-cmake/pytest-cmake"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/python-cmake/pytest-cmake","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-cmake%2Fpytest-cmake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-cmake%2Fpytest-cmake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-cmake%2Fpytest-cmake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-cmake%2Fpytest-cmake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/python-cmake","download_url":"https://codeload.github.com/python-cmake/pytest-cmake/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-cmake%2Fpytest-cmake/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","development","pytest","python"],"created_at":"2026-01-14T07:00:05.581Z","updated_at":"2026-01-14T07:00:06.299Z","avatar_url":"https://github.com/python-cmake.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pytest CMake\n\n[![PyPi version](https://img.shields.io/pypi/v/pytest-cmake.svg?logo=pypi\u0026label=PyPI\u0026logoColor=gold)](https://pypi.python.org/pypi/pytest-cmake)\n[![CMake](https://img.shields.io/badge/CMake-3.20...4.2-blue.svg?logo=CMake\u0026logoColor=blue)](https://cmake.org)\n[![Test](https://github.com/python-cmake/pytest-cmake/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/python-cmake/pytest-cmake/actions/workflows/test.yml)\n[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nThis project provides convenient ways to use [Pytest](https://docs.pytest.org/)\nwithin a [CMake](https://cmake.org/) project. The package can be discovered from a specific range of\nversions on Linux, macOS or Windows using the\n[find_package](https://cmake.org/cmake/help/latest/command/find_package.html)\nfunction:\n\n```cmake\nfind_package(Pytest 8.2.1 REQUIRED)\n```\n\nA ``pytest_discover_tests`` function is provided to simplify automatic\ntesting for C++ projects with Python bindings. It can create CTest tests\nfor each Python test collected within a controlled environment:\n\n```cmake\npytest_discover_tests(\n    PythonTest\n    LIBRARY_PATH_PREPEND\n        $\u003cTARGET_FILE_DIR:MyLibrary\u003e\n    PYTHON_PATH_PREPEND\n        $\u003cTARGET_FILE_DIR:MyLibrary\u003e\n    TRIM_FROM_NAME \"^test_\"\n    DEPENDS MyLibrary\n)\n```\n\nRunning the tests will display the status for each test collected as follows:\n\n```console\n    Start 1: PythonTest.greet_world\n1/4 Test #1: PythonTest.greet_world ...........   Passed    0.47 sec\n    Start 2: PythonTest.greet_john\n2/4 Test #2: PythonTest.greet_john ............   Passed    0.47 sec\n    Start 3: PythonTest.greet_julia\n3/4 Test #3: PythonTest.greet_julia ...........   Passed    0.47 sec\n    Start 4: PythonTest.greet_michael\n4/4 Test #4: PythonTest.greet_michael .........   Passed    0.54 sec\n```\n\n## Documentation\n\nFull documentation, including installation and setup guides, can be found at\nhttps://python-cmake.github.io/pytest-cmake/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-cmake%2Fpytest-cmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpython-cmake%2Fpytest-cmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-cmake%2Fpytest-cmake/lists"}