Skip to content

Commit

Permalink
Update "Running Tests" documentation (#12334)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Moore <p.f.moore@gmail.com>
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
  • Loading branch information
3 people authored Oct 11, 2023
1 parent d1f0981 commit 496b268
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/html/development/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pip's tests are written using the :pypi:`pytest` test framework and
:mod:`unittest.mock`. :pypi:`nox` is used to automate the setup and execution
of pip's tests.

It is preferable to run the tests in parallel for better experience during development,
It is preferable to run the tests in parallel for a better experience during development,
since the tests can take a long time to finish when run sequentially.

To run tests:
Expand Down Expand Up @@ -104,6 +104,15 @@ can select tests using the various ways that pytest provides:
$ # Using keywords
$ nox -s test-3.10 -- -k "install and not wheel"
.. note::

When running pip's tests with OS distribution Python versions, be aware that some
functional tests may fail due to potential patches introduced by the distribution.
For all tests to pass consider:

- Installing Python from `python.org`_ or compile from source
- Or, using `pyenv`_ to assist with source compilation

Running pip's entire test suite requires supported version control tools
(subversion, bazaar, git, and mercurial) to be installed. If you are missing
any of these VCS, those tests should be skipped automatically. You can also
Expand All @@ -114,6 +123,9 @@ explicitly tell pytest to skip those tests:
$ nox -s test-3.10 -- -k "not svn"
$ nox -s test-3.10 -- -k "not (svn or git)"
.. _python.org: https://www.python.org/downloads/
.. _pyenv: https://github.com/pyenv/pyenv


Running Linters
===============
Expand Down
1 change: 1 addition & 0 deletions news/12334.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document that using OS-provided Python can cause pip's test suite to report false failures.

0 comments on commit 496b268

Please sign in to comment.