summaryrefslogtreecommitdiff
path: root/doc/development_guide
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2021-11-25 14:06:29 +0100
committerGitHub <noreply@github.com>2021-11-25 14:06:29 +0100
commitaa048f7787dc1f16938e4ddefd2a7f2b0af98651 (patch)
treecb6cf1b11fef5b39f704e84f60578acdf5d45c39 /doc/development_guide
parentfa7a84fa712915fde725cda63a5bfbf4ed5cd22a (diff)
downloadpylint-git-aa048f7787dc1f16938e4ddefd2a7f2b0af98651.tar.gz
Add documentation for primer and convert to command line option (#5387)
* Add documentation for primer and convert to command line option Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Diffstat (limited to 'doc/development_guide')
-rw-r--r--doc/development_guide/testing.rst21
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/development_guide/testing.rst b/doc/development_guide/testing.rst
index d2fe7e785..ffcba3b00 100644
--- a/doc/development_guide/testing.rst
+++ b/doc/development_guide/testing.rst
@@ -87,7 +87,7 @@ current environment in order to have faster feedback. Run from Pylint root direc
python tests/test_functional.py
-You can use all the options you would use for pytest, for example ``-k "test_functional[len_checks]"``.
+You can use all the options you would use for pytest_, for example ``-k "test_functional[len_checks]"``.
Furthermore, if required the .txt file with expected messages can be regenerated based
on the the current output by appending ``--update-functional-output`` to the command line::
@@ -138,6 +138,25 @@ and should exit with exit code 2 the ``.out`` file should be named ``bad_configu
The content of the ``.out`` file should have a similar pattern as a normal Pylint output. Note that the
module name should be ``{abspath}`` and the file name ``{relpath}``.
+Primer tests
+-------------------------------------------
+
+Pylint also uses what we refer to as ``primer`` tests. These are tests that are run automatically
+in our Continuous Integration and check whether any changes in Pylint lead to crashes or fatal errors
+on the ``stdlib`` and a selection of external repositories.
+
+To run the ``primer`` tests you can add either ``--primer-stdlib`` or ``--primer-external`` to the
+pytest_ command. If you want to only run the ``primer`` you can add either of their marks, for example::
+
+ pytest -m primer_external --primer-external
+
+The list of repositories is created on the basis of three criteria: 1) projects need to use a diverse
+range of language features, 2) projects need to be well maintained and 3) projects should not have a codebase
+that is too repetitive. This guarantees a good balance between speed of our CI and finding potential bugs.
+
+You can find the latest list of repositories and any relevant code for these tests in the ``tests/primer``
+directory.
+
.. _tox: https://tox.readthedocs.io/en/latest/
.. _pytest: https://pytest.readthedocs.io/en/latest/
.. _astroid: https://github.com/pycqa/astroid