FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs: recommend parallel test execution by harshit-s-gowda · Pull Request #1917 · python/devguide · GitHub

Repository navigation

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
31 changes: 6 additions & 25 deletions testing/run-write-tests.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@ Running and writing tests
Running
=======

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

.. tab:: Unix

.. code-block:: shell

./python -m test
./python -m test -j0

.. tab:: macOS

.. code-block:: shell

./python.exe -m test
./python.exe -m test -j0

This works on :ref:`most <mac-python.exe>` macOS systems.

.. tab:: Windows

.. code-block:: dosbatch

.\python.bat -m test
.\python.bat -m test -j0

This will run the majority of tests, but exclude a small portion of them; these
excluded tests use special kinds of resources: for example, accessing the
Expand Down Expand Up @@ -139,26 +139,7 @@ But, there are several important notes:
In other words: if some module does not have ``unittest.main()``, then
most likely it does not support direct invocation.

If you have a multi-core or multi-CPU machine, you can enable parallel testing
using several Python processes so as to speed up things:

.. tab:: Unix

.. code-block:: shell

./python -m test -j0

.. tab:: macOS

.. code-block:: shell

./python.exe -m test -j0

.. tab:: Windows

.. code-block:: dosbatch

.\python.bat -m test -j0

.. _strenuous_testing:

Expand Down
Loading

Back | FazBrowse Home | New Git URL