A plugin for testing Cython extension modules.
Project description
Overview
This pytest plugin allows for the doctesting of C/C++ extension modules for Python created through cython.
Installation
You can install pytest-cython via pip from PyPI:
pip install pytest-cython
Usage
Basic usage:
pytest --doctest-cython
You can also run the doctests for a single .pyx file as such:
pytest --doctest-cython path/to/module.pyx
Notes
- The pytest option
--import-mode=importlibis not supported, though we would like it to be. - When using the pytest option
--import-mode=prependwith packages that are installed in a non-editable fashion, you must set the environment variablePY_IGNORE_IMPORTMISMATCH=1.
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.4.x | 9 | 3 |
| 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 along with a detailed description.
Acknowledgements
This pytest plugin was generated with cookiecutter along with @hackebrot's cookiecutter-pytest-plugin and @ionelmc's cookiecutter-pylibrary templates.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_cython-0.4.0.tar.gz.
File metadata
- Download URL: pytest_cython-0.4.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a569ab4b0f129a2b2e6c0c998ed279b11eca3144d72a313cde24a176a8729690
|
|
| MD5 |
e65a2fdcf2e24cd047f5a22cffdedc0c
|
|
| BLAKE2b-256 |
f958fafbcf474da6ae2f6cf6b159e2d38d01961deada7a806f88edd926bb1b2d
|
Provenance
The following attestation bundles were made for pytest_cython-0.4.0.tar.gz:
Publisher:
python-publish.yml on pytest-cython/pytest-cython
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_cython-0.4.0.tar.gz -
Subject digest:
a569ab4b0f129a2b2e6c0c998ed279b11eca3144d72a313cde24a176a8729690 - Sigstore transparency entry: 1085787043
- Sigstore integration time:
-
Permalink:
pytest-cython/pytest-cython@7567942347d4c56f23f584a86d03764206954aed -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/pytest-cython
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7567942347d4c56f23f584a86d03764206954aed -
Trigger Event:
release
-
Statement type:
File details
Details for the file pytest_cython-0.4.0-py3-none-any.whl.
File metadata
- Download URL: pytest_cython-0.4.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1348912d0f8a5aaacaf156e8bb3d7c905e3fd44e1ffbafeeb201b86a88738c4
|
|
| MD5 |
f512d2efd7bfeb4dd9e1c122397d5b72
|
|
| BLAKE2b-256 |
d4f18c76e174dc69374ba847bf001c7686f9410acf1bf1e2d557441eaad4cc1e
|
Provenance
The following attestation bundles were made for pytest_cython-0.4.0-py3-none-any.whl:
Publisher:
python-publish.yml on pytest-cython/pytest-cython
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_cython-0.4.0-py3-none-any.whl -
Subject digest:
b1348912d0f8a5aaacaf156e8bb3d7c905e3fd44e1ffbafeeb201b86a88738c4 - Sigstore transparency entry: 1085787158
- Sigstore integration time:
-
Permalink:
pytest-cython/pytest-cython@7567942347d4c56f23f584a86d03764206954aed -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/pytest-cython
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7567942347d4c56f23f584a86d03764206954aed -
Trigger Event:
release
-
Statement type: