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:
committed by
James Bungard
parent
c83f73e19c
commit
7674f6b186
@@ -43,6 +43,33 @@ def test_auto_detect_cpus(testdir, monkeypatch):
|
||||
config = testdir.parseconfigure("-nauto")
|
||||
assert config.getoption('numprocesses') == 99
|
||||
|
||||
def test_boxed_with_collect_only(testdir):
|
||||
from xdist.plugin import pytest_cmdline_main as check_options
|
||||
config = testdir.parseconfigure("-n1", "--boxed")
|
||||
check_options(config)
|
||||
assert config.option.forked
|
||||
|
||||
config = testdir.parseconfigure("-n1", "--collect-only")
|
||||
check_options(config)
|
||||
assert not config.option.forked
|
||||
|
||||
config = testdir.parseconfigure("-n1", "--boxed", "--collect-only")
|
||||
check_options(config)
|
||||
assert config.option.forked
|
||||
|
||||
def test_dsession_with_collect_only(testdir):
|
||||
from xdist.plugin import pytest_cmdline_main as check_options
|
||||
from xdist.plugin import pytest_configure as configure
|
||||
|
||||
config = testdir.parseconfigure("-n1")
|
||||
check_options(config)
|
||||
configure(config)
|
||||
assert config.pluginmanager.hasplugin("dsession")
|
||||
|
||||
config = testdir.parseconfigure("-n1", "--collect-only")
|
||||
check_options(config)
|
||||
configure(config)
|
||||
assert not config.pluginmanager.hasplugin("dsession")
|
||||
|
||||
class TestDistOptions:
|
||||
def test_getxspecs(self, testdir):
|
||||
|
||||
Reference in New Issue
Block a user