[
https://issues.apache.org/jira/browse/ARROW-16018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alessandro Molina resolved ARROW-16018.
---------------------------------------
Resolution: Fixed
Issue resolved by pull request 13204
[https://github.com/apache/arrow/pull/13204]
> [Doc][Python] Run doctests on Python docstring examples
> -------------------------------------------------------
>
> Key: ARROW-16018
> URL: https://issues.apache.org/jira/browse/ARROW-16018
> Project: Apache Arrow
> Issue Type: Sub-task
> Components: Documentation, Python
> Reporter: Joris Van den Bossche
> Assignee: Alenka Frim
> Priority: Major
> Labels: pull-request-available
> Fix For: 9.0.0
>
> Time Spent: 7h 10m
> Remaining Estimate: 0h
>
> We start to add more and more examples to the docstrings of Python methods
> (ARROW-15367), and so we could use the doctest functionality to ensure that
> those examples are actually correct (and keep being correct).
> Pytest has integration for doctests
> (https://docs.pytest.org/en/6.2.x/doctest.html), and so you can do:
> {code}
> pytest python/pyarrow --doctest-modules
> {code}
> This currently fails for me because not having pyarrow.cuda, so we will need
> to find some ways to automatically skips those parts if not available.
> Normally, that should be possible with adding a {{conftest.py}} file in the
> main {{pyarrow}} directory, and then we can influence which files are found
> by defining {{pytest_runtest_setup}} or {{pytest_collection_modifyitems}}.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)