Skip to content

Commit 496b268

Browse files
notatallshawpfmoorepradyunsg
authored
Update "Running Tests" documentation (#12334)
Co-authored-by: Paul Moore <[email protected]> Co-authored-by: Pradyun Gedam <[email protected]>
1 parent d1f0981 commit 496b268

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

docs/html/development/getting-started.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pip's tests are written using the :pypi:`pytest` test framework and
7373
:mod:`unittest.mock`. :pypi:`nox` is used to automate the setup and execution
7474
of pip's tests.
7575

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

7979
To run tests:
@@ -104,6 +104,15 @@ can select tests using the various ways that pytest provides:
104104
$ # Using keywords
105105
$ nox -s test-3.10 -- -k "install and not wheel"
106106
107+
.. note::
108+
109+
When running pip's tests with OS distribution Python versions, be aware that some
110+
functional tests may fail due to potential patches introduced by the distribution.
111+
For all tests to pass consider:
112+
113+
- Installing Python from `python.org`_ or compile from source
114+
- Or, using `pyenv`_ to assist with source compilation
115+
107116
Running pip's entire test suite requires supported version control tools
108117
(subversion, bazaar, git, and mercurial) to be installed. If you are missing
109118
any of these VCS, those tests should be skipped automatically. You can also
@@ -114,6 +123,9 @@ explicitly tell pytest to skip those tests:
114123
$ nox -s test-3.10 -- -k "not svn"
115124
$ nox -s test-3.10 -- -k "not (svn or git)"
116125
126+
.. _python.org: https://www.python.org/downloads/
127+
.. _pyenv: https://github.com/pyenv/pyenv
128+
117129

118130
Running Linters
119131
===============

news/12334.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Document that using OS-provided Python can cause pip's test suite to report false failures.

0 commit comments

Comments
 (0)