From 1fa1065f9e998f6e7baac52391b61132696c1de7 Mon Sep 17 00:00:00 2001 From: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:37:59 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Fix=20all=20tests=20are=20skipped?= =?UTF-8?q?=20on=20Windows=20(#14994)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix all tests are skipped on Windows --- scripts/tests/test_translation_fixer/conftest.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/tests/test_translation_fixer/conftest.py b/scripts/tests/test_translation_fixer/conftest.py index 006f519f46..06366d5a45 100644 --- a/scripts/tests/test_translation_fixer/conftest.py +++ b/scripts/tests/test_translation_fixer/conftest.py @@ -10,9 +10,17 @@ skip_on_windows = pytest.mark.skipif( ) -def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: +THIS_DIR = Path(__file__).parent.resolve() + + +def pytest_collection_modifyitems(config, items: list[pytest.Item]) -> None: + if sys.platform != "win32": + return + for item in items: - item.add_marker(skip_on_windows) + item_path = Path(item.fspath).resolve() + if item_path.is_relative_to(THIS_DIR): + item.add_marker(skip_on_windows) @pytest.fixture(name="runner")