Improve UsageError when used with --pdb

It might not be clear that pytest-xdist is used at all, and this should
help users to make --pdb work.
This commit is contained in:
Daniel Hahler
2017-09-23 21:07:39 +02:00
parent 665b8eda8d
commit 3799caa4fc

View File

@@ -105,7 +105,7 @@ def pytest_cmdline_main(config):
if val("dist") != "no":
if usepdb:
raise pytest.UsageError(
"--pdb incompatible with distributing tests.")
"--pdb is incompatible with distributing tests; try using -n0.") # noqa: E501
# -------------------------------------------------------------------------
# fixtures