$npx skillfedfor your agent

pytest-cython

A plugin for testing Cython extension modules.

With conditionsPyPI UtilitiesReleased Mar 2026281.4K downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_cython-0.4.0-py3-none-any.whl
v0.4.0 · released 2026-03-11 · Python >=3.8 · 1 runtime deps: pytest

Yes, if you maintain Cython extensions and want to validate embedded documentation. The plugin is low-friction (one dependency, pure Python), actively maintained, and has no security issues. The main caveat: license terms are undocumented in the package metadata—verify the actual license in the repository before use in proprietary or restricted contexts. Not applicable if you don't use Cython or don't write doctests.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >=3.8.
  • The --import-mode=importlib option is not supported; --import-mode=prepend with non-editable packages requires PY_IGNORE_IMPORTMISMATCH=1 environment variable.
  • Low friction: pure Python wheel with only pytest as a runtime dependency.

License · maintenance · safety

(unclear) — License status is unclear—no SPDX identifier or raw license text is recorded. Verify the actual license terms in the repository before adopting in a commercial or restricted context.

last release 2026-03-11 (156 days) · last repo commit 2026-03-11 · 22 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 281,417 downloads/mo, #8,097 on PyPI

Verify before relying

pip install pytest-cython

# In your project, run:
pytest --doctest-cython

# Or for a specific .pyx file:
pytest --doctest-cython path/to/module.pyx
  • Whether the package is actually licensed under an open-source or proprietary license (license metadata is missing).
  • Real-world compatibility with Cython 3.x versions beyond the documented 0.4.x / Cython 3 pairing.
  • Whether doctests in compiled .pyx modules execute with the same semantics as Python doctests.
Same gist for agents: .md · .json

What it is and what it does

pytest-cython is a pytest plugin that extends pytest's doctest discovery and execution to Cython `.pyx` source files. It allows you to write and run doctests directly in docstrings of Cython extension modules, treating them as executable documentation that pytest can validate. This bridges the gap between Cython's compiled C/C++ extensions and Python's standard doctest workflow, letting developers verify that code examples in their Cython module documentation actually work.

The plugin integrates seamlessly with pytest's command-line interface via the `--doctest-cython` flag. It has a single runtime dependency on pytest itself, making installation straightforward. Compatibility is versioned: the current 0.4.x release targets pytest 9 and Cython 3. The package has been maintained since 2016 and remains actively developed, with no known security vulnerabilities.

Use it for

  • Verify that code examples in Cython module docstrings execute correctly as part of your test suite.
  • Document C/C++ extension behavior through executable examples without maintaining separate test files.
  • Catch documentation drift in Cython projects by running doctests alongside unit tests in CI/CD.
  • Test the public API of compiled Cython modules by embedding doctests in `.pyx` files.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you maintain Cython extensions and want to validate embedded documentation.

The plugin is low-friction (one dependency, pure Python), actively maintained, and has no security issues. The main caveat: license terms are undocumented in the package metadata—verify the actual license in the repository before use in proprietary or restricted contexts. Not applicable if you don't use Cython or don't write doctests.

Install

pytest-cython on PyPI

Before you install

Low friction: pure Python wheel with only pytest as a runtime dependency. Active maintenance with a recent release (156 days ago) and no known vulnerabilities.

Requires Python >=3.8. The --import-mode=importlib option is not supported; --import-mode=prepend with non-editable packages requires PY_IGNORE_IMPORTMISMATCH=1 environment variable.

License in practice

License status is unclear—no SPDX identifier or raw license text is recorded. Verify the actual license terms in the repository before adopting in a commercial or restricted context.

Quickstart

pip install pytest-cython

# In your project, run:
pytest --doctest-cython

# Or for a specific .pyx file:
pytest --doctest-cython path/to/module.pyx

Verify before relying

  • Whether the package is actually licensed under an open-source or proprietary license (license metadata is missing).
  • Real-world compatibility with Cython 3.x versions beyond the documented 0.4.x / Cython 3 pairing.
  • Whether doctests in compiled .pyx modules execute with the same semantics as Python doctests.

Package facts

LicenseNot declared unclear
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
pytest
MaintenanceActively maintained 156 days since the last release
Last repo commit
First released
Downloads281,417 / month, #8,097 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: TestingTopic :: Utilities

Evidence: pytest_cython-0.4.0-py3-none-any.whl

Tags

Capabilities
pytest cython doctestcython extension module testingdoctest for pyx filespytest plugin cythoncython docstring testing
Topics
cythondoctesttesting
PyPI keywords
pytestpy.testcythondoctest

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pytest cython doctest”

  • pytest-cythonA pytest plugin that runs doctests embedded in Cython `.pyx`…
  • pytest-doctestplusA pytest plugin that runs doctests in Python docstrings and…
  • xdoctestXdoctest finds and executes test code embedded in Python docstrings,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also pytest-logging · xdoctest · pytest-doctestplus · pytest-helpers-namespace · pytest-xml · pytest-xvfb · pytest-json · pytest-snapshot · pytest-custom-exit-code · pytest-rich