Implemented a load scheduler that groups tests by scope.

This commit is contained in:
Carlos Jenkins
2017-07-20 16:05:20 -06:00
parent 8356cfa39d
commit b0916f06ce
5 changed files with 443 additions and 2 deletions

View File

@@ -31,12 +31,14 @@ def pytest_addoption(parser):
"when crashed (set to zero to disable this feature)")
group._addoption(
'--dist', metavar="distmode",
action="store", choices=['each', 'load', 'no'],
action="store", choices=['each', 'load', 'loadscope', 'no'],
dest="dist", default="no",
help=("set mode for distributing tests to exec environments.\n\n"
"each: send each test to all available environments.\n\n"
"load: load balance by sending any pending test to any"
" available environment.\n\n"
"loadscope: load balance by sending pending groups of tests in"
" the same scope to any available environment.\n\n"
"(default) no: run tests inprocess, don't distribute."))
group._addoption(
'--tx', dest="tx", action="append", default=[],