Skip to content

Commit ae1934c

Browse files
committed
Update contributing docs for parallelizing integration tests
1 parent c3dc0b0 commit ae1934c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/contributing.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ Within the ``pytest`` scope, :file:`conftest.py` files are used for common code
160160
shared between modules that exist within the same directory as that particular
161161
:file:`conftest.py` file.
162162

163+
163164
Unit Testing and eth-tester Tests
164165
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
165166

@@ -200,6 +201,16 @@ tests are written across different files within ``/web3/_utils/module_testing``.
200201
client-and-provider-specific test configurations exist. This is mostly used to
201202
override tests specific to the provider type for the respective client.
202203

204+
The integration tests are each run in insolation to prevent muddied contexts. Because
205+
they are run in isolation, they can be parallelized with ``pytest-xdist`` in order to
206+
speed up the test suite. To run the tests in parallel, you can use the ``-n`` flag
207+
with ``pytest``. For example, to run the tests in parallel with 4 workers, you can
208+
use the following command:
209+
210+
.. code:: sh
211+
212+
$ pytest tests/integration/go_ethereum/path/to/module/or/test -n 4
213+
203214
204215
Working With Test Contracts
205216
^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)