pytest-cmake-1.3.0


توضیحات

Provide CMake module for Pytest
ویژگی مقدار
سیستم عامل -
نام فایل pytest-cmake-1.3.0
نام pytest-cmake
نسخه کتابخانه 1.3.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده Jeremy Retailleau <jeremy.retailleau@gmail.com>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/pytest-cmake/
مجوز MIT License Copyright (c) 2022 Jeremy Retailleau Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Pytest CMake [![PyPi version](https://img.shields.io/pypi/v/pytest-cmake.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.python.org/pypi/pytest-cmake) [![CMake](https://img.shields.io/badge/CMake-3.20...4.2-blue.svg?logo=CMake&logoColor=blue)](https://cmake.org) [![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) [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) This project provides convenient ways to use [Pytest](https://docs.pytest.org/) within a [CMake](https://cmake.org/) project. The package can be discovered from a specific range of versions on Linux, macOS or Windows using the [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) function: ```cmake 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: ```cmake 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: ```console 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/


نیازمندی

مقدار نام
- pytest<10,>=4


زبان مورد نیاز

مقدار نام
<4,>=3.7 Python


نحوه نصب


نصب پکیج whl pytest-cmake-1.3.0:

    pip install pytest-cmake-1.3.0.whl


نصب پکیج tar.gz pytest-cmake-1.3.0:

    pip install pytest-cmake-1.3.0.tar.gz