From 4f8d253d7adea7bd2326160e529fec124b6775e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Bal=C3=A1=C5=BEik?= Date: Wed, 28 Jan 2026 01:03:10 +0100 Subject: [PATCH] Set dist=loadscope for pytest in pytest.ini Previously there was some handling of old pytest-xdist versions which is no longer needed. (cherry picked from commit c47b0764948ac90d691ee95753a8d18e4fe1b0d2) --- bin/tests/system/conftest.py | 20 -------------------- bin/tests/system/pytest.ini | 2 +- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/bin/tests/system/conftest.py b/bin/tests/system/conftest.py index c00161d39d..9ffff85d44 100644 --- a/bin/tests/system/conftest.py +++ b/bin/tests/system/conftest.py @@ -41,7 +41,6 @@ isctest.vars.init_vars() # ----------------------- Globals definition ----------------------------- -XDIST_WORKER = os.environ.get("PYTEST_XDIST_WORKER", "") FILE_DIR = os.path.abspath(Path(__file__).parent) ENV_RE = Re(b"([^=]+)=(.*)") PRIORITY_TESTS = [ @@ -73,25 +72,6 @@ def pytest_addoption(parser): ) -def pytest_configure(config): - # Ensure this hook only runs on the main pytest instance if xdist is - # used to spawn other workers. - if not XDIST_WORKER: - if config.pluginmanager.has_plugin("xdist") and config.option.numprocesses: - # system tests depend on module scope for setup & teardown - # enforce use "loadscope" scheduler or disable paralelism - try: - import xdist.scheduler.loadscope # pylint: disable=unused-import - except ImportError: - isctest.log.debug( - "xdist is too old and does not have " - "scheduler.loadscope, disabling parallelism" - ) - config.option.dist = "no" - else: - config.option.dist = "loadscope" - - def pytest_ignore_collect(collection_path): # System tests are executed in temporary directories inside # bin/tests/system. These temporary directories contain all files diff --git a/bin/tests/system/pytest.ini b/bin/tests/system/pytest.ini index 5574b3e611..fce4abff24 100644 --- a/bin/tests/system/pytest.ini +++ b/bin/tests/system/pytest.ini @@ -10,7 +10,7 @@ # information regarding copyright ownership. [pytest] -addopts = --tb=short -rA -vv +addopts = --tb=short -rA -vv --dist=loadscope log_format = %(asctime)s %(levelname)s:%(name)s %(message)s log_date_format = %Y-%m-%d %H:%M:%S log_cli = 1