https://github.com/lgpage/pytest-cython
A pytest plugin that allows for the testing of C extension modules for Python, specifically created through cython
https://github.com/lgpage/pytest-cython
cython pytest python test testing unit-testing
Last synced: 17 days ago
JSON representation
A pytest plugin that allows for the testing of C extension modules for Python, specifically created through cython
- Host: GitHub
- URL: https://github.com/lgpage/pytest-cython
- Owner: lgpage
- License: mit
- Created: 2016-04-03T18:26:48.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2025-02-24T18:57:33.000Z (2 months ago)
- Last Synced: 2025-03-17T13:09:37.556Z (about 1 month ago)
- Topics: cython, pytest, python, test, testing, unit-testing
- Language: Python
- Homepage:
- Size: 144 KB
- Stars: 20
- Watchers: 3
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Overview
[](https://pypi.org/project/pytest-cython)
[](https://pypi.org/project/pytest-cython)
[](https://pypi.org/project/pytest-cython)
[](https://pypi.org/project/pytest-cython)
[](https://pypi.org/project/pytest-cython)
[](https://anaconda.org/conda-forge/pytest-cython)
[](https://anaconda.org/conda-forge/pytest-cython)[](https://github.com/lgpage/pytest-cython/actions/workflows/python-check.yml?query=branch%3Amain)
[](https://github.com/lgpage/pytest-cython/actions/workflows/python-test.yml?query=branch%3Amain)
[](https://readthedocs.org/projects/pytest-cython)This [pytest](https://github.com/pytest-dev/pytest) plugin allows for the doctesting of C extension modules for
Python, specifically created through [cython](https://cython.org/).## Installation
You can install "pytest-cython" via [pip](https://pypi.org/project/pip/) from [PyPI](https://pypi.org):
``` shell
pip install pytest-cython
```## Usage
Basic usage:
``` shell
pytest --doctest-cython
```You can also run the doctests for a single `.pyx` file as such:
``` shell
pytest --doctest-cython path/to/module.pyx
```### Note
It is assumed that the C extension modules have been build in place before running `py.test` and there is a
matching Cython `.pyx` file## Compatibility
The following table describes the versions of Pytest and Cython the each version of the pytest-cython plugin is
compatible with.| Version | Pytest | Cython |
| ------- | ------ | ------- |
| 0.3.x | 8 | 0.29, 3 |
| 0.2.x | 6, 7 | 0.29, 3 |## Issues
If you encounter any problems, please [file an issue](https://github.com/lgpage/pytest-cython/issues) along with a
detailed description.## Acknowledgements
This [pytest](https://github.com/pytest-dev/pytest) plugin was generated with
[cookiecutter](https://github.com/cookiecutter/cookiecutter) along with [\@hackebrot](https://github.com/hackebrot)'s
[cookiecutter-pytest-plugin](https://github.com/pytest-dev/cookiecutter-pytest-plugin) and
[\@ionelmc](https://github.com/ionelmc)'s [cookiecutter-pylibrary](https://github.com/ionelmc/cookiecutter-pylibrary)
templates.