add '--numprocesses' as long option for '-n'

This is more verbose in scripts that run pytest-xdist. It can also help
in some ci-helper scripts like to auto detect if  pytest-xdist should be
installed.
This commit is contained in:
Max Linke
2017-06-22 21:24:57 +02:00
parent 2094157950
commit dbaf49cd69
3 changed files with 6 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ def parse_numprocesses(s):
def pytest_addoption(parser):
group = parser.getgroup("xdist", "distributed and subprocess testing")
group._addoption(
'-n', dest="numprocesses", metavar="numprocesses",
'-n', '--numprocesses', dest="numprocesses", metavar="numprocesses",
action="store",
type=parse_numprocesses,
help="shortcut for '--dist=load --tx=NUM*popen', "