Skip to content

GH-49503: [Docs][Python] Document .pxi doctests#49516

Open
BillionClaw wants to merge 1 commit intoapache:mainfrom
BillionClaw:clawoss/docs/pxi-doctests
Open

GH-49503: [Docs][Python] Document .pxi doctests#49516
BillionClaw wants to merge 1 commit intoapache:mainfrom
BillionClaw:clawoss/docs/pxi-doctests

Conversation

@BillionClaw
Copy link

@BillionClaw BillionClaw commented Mar 15, 2026

Description

This PR adds documentation explaining how to test doctests in .pxi files.

The documentation now clarifies that:

  • .pxi file doctests are actually tested via lib.pyx
  • The command pattern is: python -m pytest --doctest-cython path/to/lib.pyx
  • Any doctest errors in .pxi files will surface under lib.pyx in the test output, not under the original .pxi filename

Related Issue

Closes #49503

Changes

  • Added a .. note:: block in docs/source/developers/python/development.rst under the Doctest section

Add documentation explaining that .pxi file doctests are tested via
lib.pyx and that errors surface under lib.pyx rather than the
original .pxi filename.

Closes apache#49503
@github-actions
Copy link

⚠️ GitHub issue #49503 has been automatically assigned in GitHub to PR creator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs][Python] Document that .pxi doctests are tested via lib.pyx

1 participant