AlenkaF commented on code in PR #49515:
URL: https://github.com/apache/arrow/pull/49515#discussion_r2959538947


##########
docs/source/developers/python/development.rst:
##########
@@ -195,6 +195,17 @@ for ``.py`` files or
 for ``.pyx`` and ``.pxi`` files. In this case you will also need to
 install the `pytest-cython <https://github.com/lgpage/pytest-cython>`_ plugin.
 
+.. note::

Review Comment:
   I think this is fine 👍 



##########
docs/source/developers/python/development.rst:
##########
@@ -195,6 +195,17 @@ for ``.py`` files or
 for ``.pyx`` and ``.pxi`` files. In this case you will also need to
 install the `pytest-cython <https://github.com/lgpage/pytest-cython>`_ plugin.
 
+.. note::
+   Cython ``.pxi`` files are included in ``.pyx`` files at compile time,
+   so ``--doctest-cython`` cannot be run directly on ``.pxi`` files.
+   Instead, run doctests on the ``.pyx`` file they are included in, for
+   example ``lib.pyx``::
+
+      $ python -m pytest --doctest-cython pyarrow/lib.pyx
+
+   Any doctest errors originating from ``.pxi`` files will appear under
+   the corresponding ``.pyx`` file, not the original ``.pxi`` filename.

Review Comment:
   In PyArrow all the `.pxi` files are included into one `.pyx` file, namely 
`lib.pyx`, see: 
https://github.com/apache/arrow/blob/d08d5e64fcfd8759d3a7089eced3e9a2d7a17f20/python/pyarrow/lib.pyx#L197-L246
   
   Therefore we can make the more general (though correct) statement here into 
a more concrete and clear that all the `.pxi` files in this case will be part 
of the `lib.pyx` and not any other `.pyx` file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to