Merge remote-tracking branch 'upstream/master' into cpu-auto-errors
This commit is contained in:
@@ -101,12 +101,20 @@ def pytest_cmdline_main(config):
|
||||
config.option.dist = "load"
|
||||
val = config.getvalue
|
||||
if not val("collectonly"):
|
||||
usepdb = config.option.usepdb # a core option
|
||||
if val("looponfail"):
|
||||
if usepdb:
|
||||
raise pytest.UsageError(
|
||||
"--pdb incompatible with --looponfail.")
|
||||
elif val("dist") != "no":
|
||||
usepdb = config.getoption('usepdb') # a core option
|
||||
if val("dist") != "no":
|
||||
if usepdb:
|
||||
raise pytest.UsageError(
|
||||
"--pdb incompatible with distributing tests.")
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# fixtures
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def worker_id(request):
|
||||
if hasattr(request.config, 'slaveinput'):
|
||||
return request.config.slaveinput['slaveid']
|
||||
else:
|
||||
return 'master'
|
||||
|
||||
Reference in New Issue
Block a user