From 97483386bde4febe7ff48726f887cc6423d308b9 Mon Sep 17 00:00:00 2001 From: Chedi Date: Tue, 15 Nov 2022 11:18:31 +0100 Subject: [PATCH 1/2] disabling boxed test if version xdist newer than 2.5.0 --- tests/test_pytest_cov.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py index 84fe42ba..6f60debd 100644 --- a/tests/test_pytest_cov.py +++ b/tests/test_pytest_cov.py @@ -1555,7 +1555,8 @@ def test_foo(): SCRIPT_SIMPLE_RESULT = '4 * 100%' - +@pytest.mark.skipif('tuple(map(int, xdist.__version__.split("."))) >= (2, 5, 0)', + reason="--boxed option was removed in version 2.5.0") @pytest.mark.skipif('sys.platform == "win32"') def test_dist_boxed(testdir): script = testdir.makepyfile(SCRIPT_SIMPLE) From 6beed7dff4edf8715df139e38621a58c302da70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sun, 21 May 2023 16:03:34 +0300 Subject: [PATCH 2/2] Skip starting from xdist 3.0.2 (where boxed was removed). Co-authored-by: Hugo van Kemenade --- tests/test_pytest_cov.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py index 6f60debd..8a822845 100644 --- a/tests/test_pytest_cov.py +++ b/tests/test_pytest_cov.py @@ -1555,8 +1555,8 @@ def test_foo(): SCRIPT_SIMPLE_RESULT = '4 * 100%' -@pytest.mark.skipif('tuple(map(int, xdist.__version__.split("."))) >= (2, 5, 0)', - reason="--boxed option was removed in version 2.5.0") +@pytest.mark.skipif('tuple(map(int, xdist.__version__.split("."))) >= (3, 0, 2)', + reason="--boxed option was removed in version 3.0.2") @pytest.mark.skipif('sys.platform == "win32"') def test_dist_boxed(testdir): script = testdir.makepyfile(SCRIPT_SIMPLE)