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