Skip to main content

A plugin for testing Cython extension modules.

Project description

Overview

PyPI Package latest release PyPI Package monthly downloads PyPI Wheel Supported versions Supported implementations Conda Version Conda Downloads

CI Lint Status CI Test Status

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=importlib is not supported, though we would like it to be.
  • When using the pytest option --import-mode=prepend with packages that are installed in a non-editable fashion, you must set the environment variable PY_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_cython-0.4.0rc1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_cython-0.4.0rc1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file pytest_cython-0.4.0rc1.tar.gz.

File metadata

  • Download URL: pytest_cython-0.4.0rc1.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

Hashes for pytest_cython-0.4.0rc1.tar.gz
Algorithm Hash digest
SHA256 47389e12f3b4c10379a353bdf84662c948e231204a7d62608af945515a32aa5e
MD5 988f8b0df2a303c0fc8f4034f5a7a8d9
BLAKE2b-256 98c5b7eddfb428f0392a6b01fe2ecdd8163be14cb2b72c44085f92403fecdbaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_cython-0.4.0rc1.tar.gz:

Publisher: python-publish.yml on pytest-cython/pytest-cython

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytest_cython-0.4.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_cython-0.4.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3ad6da6e2cc37c5098c1101a3c41b49c9a7e4a6cbc56c3f0e55cc6cfb288f88
MD5 0e06be3fe074d068d262f1c1be6f503a
BLAKE2b-256 c84cd5cb5c17ca5fc48c4f9cb47bbddc59dcafd6c385fe72c75d6df9515424a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_cython-0.4.0rc1-py3-none-any.whl:

Publisher: python-publish.yml on pytest-cython/pytest-cython

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page