File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -117,10 +117,33 @@ To run the test suite for a particular Python version, you can do::
117117 tox -e py37
118118
119119
120+ If you want to run tests on a specific portion of the code use pytest _, (pytest-cov _) and your local python version::
121+
122+ # ( pip install pytest-cov )
123+ # Everything:
124+ python3 -m pytest tests/
125+ # Everything in tests/message with coverage for the relevant code:
126+ python3 -m pytest tests/message/ --cov=pylint.message
127+ coverage html
128+ # Only the functional test "missing_kwoa_py3":
129+ python3 -m pytest "tests/test_functional.py::test_functional[missing_kwoa_py3]"
130+
131+
132+ It can be more than 100 times faster than tox and you can also get the coverage.
133+ 10000 times if you want to launch a single functional test. First, you
134+ need to clone astroid _ and install the last version from source::
135+
136+ git clone https://github.com/PyCQA/astroid.git
137+ python3 astroid/setup.py build sdist
138+ pip3 install astroid/dist/astroid*.tar.gz
139+
120140For more detailed information, check the documentation.
121141
122142.. _here : http://pylint.pycqa.org/en/latest/user_guide/installation.html
123143.. _tox : https://tox.readthedocs.io/en/latest/
144+ .. _pytest : https://docs.pytest.org/en/latest/
145+ .. _pytest-cov : https://pypi.org/project/pytest-cov/
146+ .. _astroid : https://github.com/PyCQA/astroid
124147
125148License
126149-------
You can’t perform that action at this time.
0 commit comments