-
Notifications
You must be signed in to change notification settings - Fork 232
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
Allow -n 0 to disable xdist even if --dist is specified #231
Comments
-n 0
to disable xdist even if --dist
is specified
I am concerned by this issue / change request, since I can't use a debugger when pytest-xdist runs with the --dist parameter set in my setup.cfg. I would expect that -n 0 completely disables xdist. |
I have this in my setup.cfg:
Running
If I change it to
Then it works:
I also expected |
If you do
error |
It looks like this problem was fixed long ago. Running |
Thanks! |
Following the advice in #18 I'm experimenting with
loadscope
as a means to to pin some tests to a single subprocess. This works fine but to ensure that it works properly for developers who are going to typepytest
from the command line when debugging, I need to put the--dist=loadscope
into asetup.cfg
file. The problem I now find is that any use of--dist
mandates that-n
or-tx
is used:I would be fine with this if I could add
-n 0
to disablexdist
completely regardless of the presence of--dist
. This does not work, and gives the same error message as if no-n
was used at all. If this worked then the command-line user ofpytest
will get the behavior they expect: no subprocess if they runpytest
, correctly scoped tests if they add-n 4
to override the config file.Is there any way that I can use a
setup.cfg
to use--dist=loadscope
but only to activate this if a user specifies-n
?The text was updated successfully, but these errors were encountered: