-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pytestArgs: ["-n", "4"] not working for running tests in parallel with pytest-xdist #6293
Comments
Looks like a problem with pytest. Could be because if the way pytests parsed arguments and pass them to the plugins |
Works for me. |
Cause:We're appending the file name to the list of args. |
Prescribed Solution
|
I'm not sure we understand the problem yet. Passing the file last should work fine. If there's a pytest bug then we a workaround is fine as long as we file an upstream bug and document the workaround. |
Validated |
Easy fix is to change docs to have "-n 4" instead of two args, but I don't understand why "-n", "4" is not working.
Environment data
Expected behaviour
"python.testing.pytestArgs": ["-n 4"]
and"python.testing.pytestArgs": ["-n", "4"]
should have the same behaviour, shouldn't it?Actual behaviour
Having
"python.testing.pytestArgs": ["-n", "4"]
in settings.json throws an error:pytest.py: error: argument -n/--numprocesses: invalid parse_numprocesses value: '.\\testing\\python\\approx.py'
and approx.py is the file from which I tried to execute the tests.
Steps to reproduce:
"python.testing.pytestArgs": ["-n", "4"]
to settings.json fileLogs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)The text was updated successfully, but these errors were encountered: