Skip to content

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

Closed

Description

@AlenkaF

Describe the enhancement requested

Running python -m pytest --doctest-cython directly on .pxi can't work because Cython .pxi files are included in lib.pyx at compile time.

In order to run doctests on .pxi files, doctest should be run on lib.pyx where they are compiled into, with python -m pytest --doctest-cython path-to/lib.pyx.

Also the errors will surface under lib.pyx, not the original .pxi filename.

We should add this info to the documentation:
https://arrow.apache.org/docs/developers/python/development.html#doctest

Component(s)

Python, Documentation

Activity

  1. added a commit that references this issue on Mar 15, 2026
  2. bhavanaeh commented on Mar 15, 2026

    @bhavanaeh
    Contributor

    Hi, I took a stab at this, PR here

  3. added 3 commits that reference this issue on Mar 15, 2026
    9a66c22
    64154f4
    df227a0
  4. added a commit that references this issue on Mar 20, 2026
  5. added this to the 24.0.0 milestone on Mar 20, 2026
  6. AlenkaF commented on Mar 20, 2026

    @AlenkaF
    MemberAuthor

    Issue resolved by pull request 49515
    #49515

  7. added a commit that references this issue on Apr 6, 2026
  8. added a commit that references this issue on May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions