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:
pytest python/pyarrow --doctest-modules
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.
Reporter: Joris Van den Bossche / @jorisvandenbossche
Assignee: Alenka Frim / @AlenkaF
Related issues:
PRs and other links:
Note: This issue was originally created as ARROW-16018. Please see the migration documentation for further details.
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:
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.pyfile in the mainpyarrowdirectory, and then we can influence which files are found by definingpytest_runtest_setuporpytest_collection_modifyitems.Reporter: Joris Van den Bossche / @jorisvandenbossche
Assignee: Alenka Frim / @AlenkaF
Related issues:
PRs and other links:
Note: This issue was originally created as ARROW-16018. Please see the migration documentation for further details.