Document how to run parallel tests with the Python extension
@DonJayamanne to fill in with details
@JoshuaPartlow Can we update here to include a subsection "Run tests in parallel" right below the "With PyTest, failed tests also appear in the Problems panel, where you can double-click on an issue to navigate directly to the test" paragraph?
This is how we support running tests in parallel with pytest:
- Open the integrated terminal and Install ‘pytest-xdist’ (more information can be found on their documentation):
$ pip install pytest-xdist
- Open the workspace
settings.jsonfile and add "-n","<number of CPUs>" to the pytest arguments list, specifying the number of CPUs you'd like to use. For example:
"python.testing.pyTestArgs": ["-n", "4"]
After that tests will be run in parallel
Documented now with 0d9ff50.
There's a bug where this is not working properly in some cases. Current workaround is to change ["-n", "4"] to ["-n 4"]. Can we update it in the docs like this for now?
@luabud Might be best to open a new issue