Skip to content

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

@AlenkaF

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions