diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2019-08-19 11:32:00 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-08-19 11:32:00 +0200 |
commit | 380df00f61e7ac2d0640f31b658fc853e4b8f9a0 (patch) | |
tree | e339242416cf2a05145395d85cd5a086c729022e /README.rst | |
parent | 4bf6f03c84281a7c6d23dcf9329cb346dcd70bbb (diff) | |
download | pylint-git-380df00f61e7ac2d0640f31b658fc853e4b8f9a0.tar.gz |
[Readme] Add information on how to launch tests fast (#3040)
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/README.rst b/README.rst index 44b58311b..08c428c65 100644 --- a/README.rst +++ b/README.rst @@ -117,10 +117,33 @@ To run the test suite for a particular Python version, you can do:: tox -e py37 +If you want to run tests on a specific portion of the code use pytest_, (pytest-cov_) and your local python version:: + + # ( pip install pytest-cov ) + # Everything: + python3 -m pytest tests/ + # 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]" + + +It can be more than 100 times faster than tox and you can also get the coverage. +10000 times if you want to launch a single functional test. First, you +need to clone astroid_ and install the last version from source:: + + git clone https://github.com/PyCQA/astroid.git + python3 astroid/setup.py build sdist + pip3 install astroid/dist/astroid*.tar.gz + For more detailed information, check the documentation. .. _here: http://pylint.pycqa.org/en/latest/user_guide/installation.html .. _tox: https://tox.readthedocs.io/en/latest/ +.. _pytest: https://docs.pytest.org/en/latest/ +.. _pytest-cov: https://pypi.org/project/pytest-cov/ +.. _astroid: https://github.com/PyCQA/astroid License ------- |