From 72b9e83d0e48545a3cb5db18e0c724ec406ce9c2 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Tue, 26 Apr 2022 09:49:21 +0200 Subject: Better documentation for development of pylint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> --- README.rst | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) (limited to 'README.rst') diff --git a/README.rst b/README.rst index aef1e34f1..c06543b07 100644 --- a/README.rst +++ b/README.rst @@ -106,45 +106,34 @@ Pylint is shipped with following additional commands: Testing ------- -We use tox_ and pytest-benchmark_ for running the test suite. You should be able to install it with:: +You should be able to install our tests dependencies with:: - pip install tox pytest pytest-benchmark + pip install -r requirements_test.txt - -To run the test suite for a particular Python version, you can do:: - - tox -e py37 - - -To run individual tests with ``tox``, you can do:: - - tox -e py37 -- -k name_of_the_test - - -We use pytest_ for testing ``pylint``, which you can use without using ``tox`` for a faster development cycle. - -If you want to run tests on a specific portion of the code with pytest_, (pytest-cov_) and your local python version:: +You can then use pytest_ directly. If you want to run tests on a specific portion of the +code with pytest_ and your local python version:: # ( pip install pytest-cov ) - # Everything: - python3 -m pytest tests/ + python3 -m pytest # Everything in tests/message with coverage for the relevant code: python3 -m pytest tests/message/ --cov=pylint.message coverage html # Only the functional test "missing_kwoa_py3": python3 -m pytest "tests/test_functional.py::test_functional[missing_kwoa_py3]" +You can also *optionally* install tox_. To run the test suite for a particular +Python version, with tox you can do:: -Do not forget to clone astroid_ and install the last version:: + tox -e py39 +To run individual tests with ``tox``, you can do:: - git clone https://github.com/PyCQA/astroid.git + tox -e py37 -- -k name_of_the_test - # From source - python3 astroid/setup.py build sdist - pip3 install astroid/dist/astroid*.tar.gz +If you're testing new change in astroid you need to clone astroid_ and install +the last version:: - # Using an editable installation + git clone https://github.com/PyCQA/astroid.git cd astroid python3 -m pip install -e . -- cgit v1.2.1