diff --git a/CHANGELOG b/CHANGELOG index d12c29b..85302a2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,8 +1,13 @@ -1.13.2 -------- +1.13.2.dev +---------- + +- fix README display on pypi -- fix readme display on pypi - fix #22: xdist now works if the internal tmpdir plugin is disabled. + Thanks Bruno Oliveira for the PR. + +- fix #32: xdist now works if looponfail or boxed are disabled. + Thanks Bruno Oliveira for the PR. 1.13.1 diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 93479a1..c074674 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -535,6 +535,19 @@ def test_tmpdir_disabled(testdir): result.stdout.fnmatch_lines("*1 passed*") +@pytest.mark.parametrize('plugin', ['xdist.looponfail', 'xdist.boxed']) +def test_sub_plugins_disabled(testdir, plugin): + """Test that xdist doesn't break if we disable any of its sub-plugins. (#32) + """ + p1 = testdir.makepyfile(""" + def test_ok(): + pass + """) + result = testdir.runpytest(p1, "-n1", '-p', 'no:%s' % plugin) + assert result.ret == 0 + result.stdout.fnmatch_lines("*1 passed*") + + class TestNodeFailure: def test_load_single(self, testdir): f = testdir.makepyfile(""" diff --git a/xdist/looponfail.py b/xdist/looponfail.py index 99604bb..6f76b43 100644 --- a/xdist/looponfail.py +++ b/xdist/looponfail.py @@ -25,6 +25,10 @@ def pytest_addoption(parser): def pytest_cmdline_main(config): if config.getoption("looponfail"): + usepdb = config.getoption('usepdb') # a core option + if usepdb: + raise pytest.UsageError( + "--pdb incompatible with --looponfail.") looponfail_main(config) return 2 # looponfail only can get stop with ctrl-C anyway diff --git a/xdist/plugin.py b/xdist/plugin.py index dc3635e..69c3a9b 100644 --- a/xdist/plugin.py +++ b/xdist/plugin.py @@ -94,12 +94,8 @@ 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.")