Merge pull request #168 from kain88-de/numprocesses-option
add '--numprocesses' as long option for '-n'
This commit is contained in:
1
changelog/168.feature
Normal file
1
changelog/168.feature
Normal file
@@ -0,0 +1 @@
|
||||
Add long option `--numprocesses` as alternative for `-n`.
|
||||
@@ -20,6 +20,10 @@ def test_dist_options(testdir):
|
||||
check_options(config)
|
||||
assert config.option.dist == "load"
|
||||
assert config.option.tx == ['popen'] * 2
|
||||
config = testdir.parseconfigure("--numprocesses", "2")
|
||||
check_options(config)
|
||||
assert config.option.dist == "load"
|
||||
assert config.option.tx == ['popen'] * 2
|
||||
config = testdir.parseconfigure("-d")
|
||||
check_options(config)
|
||||
assert config.option.dist == "load"
|
||||
|
||||
@@ -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', "
|
||||
|
||||
Reference in New Issue
Block a user