Skip to content

Commit 7466a23

Browse files
docs: recommend parallel test execution
1 parent 2439c5f commit 7466a23

1 file changed

Lines changed: 6 additions & 25 deletions

File tree

‎testing/run-write-tests.rst‎

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,29 @@ Running and writing tests
1717
Running
1818
=======
1919

20-
The shortest, simplest way of running the test suite is the following command
21-
from the root directory of your checkout (after you have
22-
:ref:`built Python <compiling>`):
20+
The shortest, simplest way of running the test suite is the following command,
21+
which runs tests in parallel, from the root directory of your checkout
22+
(after you have :ref:`built Python <compiling>`):
2323

2424
.. tab:: Unix
2525

2626
.. code-block:: shell
2727
28-
./python -m test
28+
./python -m test -j0
2929
3030
.. tab:: macOS
3131

3232
.. code-block:: shell
3333
34-
./python.exe -m test
34+
./python.exe -m test -j0
3535
3636
This works on :ref:`most <mac-python.exe>` macOS systems.
3737

3838
.. tab:: Windows
3939

4040
.. code-block:: dosbatch
4141
42-
.\python.bat -m test
42+
.\python.bat -m test -j0
4343
4444
This will run the majority of tests, but exclude a small portion of them; these
4545
excluded tests use special kinds of resources: for example, accessing the
@@ -139,26 +139,7 @@ But, there are several important notes:
139139
In other words: if some module does not have ``unittest.main()``, then
140140
most likely it does not support direct invocation.
141141

142-
If you have a multi-core or multi-CPU machine, you can enable parallel testing
143-
using several Python processes so as to speed up things:
144-
145-
.. tab:: Unix
146-
147-
.. code-block:: shell
148-
149-
./python -m test -j0
150-
151-
.. tab:: macOS
152-
153-
.. code-block:: shell
154-
155-
./python.exe -m test -j0
156142

157-
.. tab:: Windows
158-
159-
.. code-block:: dosbatch
160-
161-
.\python.bat -m test -j0
162143

163144
.. _strenuous_testing:
164145

0 commit comments

Comments
 (0)