AlenkaF commented on a change in pull request #11827: URL: https://github.com/apache/arrow/pull/11827#discussion_r761753094
########## File path: docs/source/developers/guide/step_by_step/testing.rst ########## @@ -29,3 +29,68 @@ *********** Testing 🧪 *********** + +In Arrow we always add a unit test to the code we are +contributing. Therefore you will also need to add one when +you finish with your work. + +.. tabs:: + + .. tab:: Pytest + + We use `pytest <https://docs.pytest.org/en/latest/>`_ for + unit tests in Python. For more info about the required + packages follow + :ref:`Python unit testing section <python-unit-testing>`. + + What we normally do is run the test we are working on + only. Once we are finished with our work and then + we run other tests also. + + To run a specific unit test use this command in + the terminal from the ``arrow/python`` folder: + + .. code-block:: + + python -m pytest pyarrow/tests/test_file.py -k test_your_unit_test + + Run all the tests from one file: + + .. code-block:: + + python -m pytest pyarrow/tests/test_file.py + + Run all the tests: + + .. code-block:: + + python -m pytest pyarrow + + If the tests start failing try to recompile + PyArrow or C++. + + .. note:: + + **Recompiling Cython** + + If you change only the .py file you do not need to + recompile PyArrow. But you have to that if you make + changes in .pyx or .pxd files. + + To do that run this command again: + + .. code-block:: + + python setup.py build_ext --inplace + + .. note:: + + **Recompiling C++** + + Similarly you will need to recompile C++ if you have + done some changes in C++ files. In this case + re-run the cmake commands again. Review comment: Yes, will add them! -- 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]
