Add tests for interactions between boxed, dist and collect-only.

Re-enable parsing of the boxed option with collect-only
This commit is contained in:
verdesmarald
2017-09-07 16:05:25 +10:00
committed by James Bungard
parent c83f73e19c
commit 7674f6b186
3 changed files with 45 additions and 9 deletions

View File

@@ -91,15 +91,14 @@ def pytest_addhooks(pluginmanager):
@pytest.mark.trylast
def pytest_configure(config):
if not config.getvalue("collectonly"):
if config.getoption("dist") != "no":
from xdist.dsession import DSession
session = DSession(config)
config.pluginmanager.register(session, "dsession")
tr = config.pluginmanager.getplugin("terminalreporter")
tr.showfspath = False
if config.getoption("boxed"):
config.option.forked = True
if config.getoption("dist") != "no" and not config.getvalue("collectonly"):
from xdist.dsession import DSession
session = DSession(config)
config.pluginmanager.register(session, "dsession")
tr = config.pluginmanager.getplugin("terminalreporter")
tr.showfspath = False
if config.getoption("boxed"):
config.option.forked = True
@pytest.mark.tryfirst