tests: skip the searxng settings migration tests on Windows (#6882)

scripts/migrate_searxng_settings.py runs inside the searxng container
entrypoint and preserves the settings file's owner and mode with
os.fchmod/os.fchown, which do not exist on Windows, so every subprocess
run of the script in this module fails with AttributeError before the
behaviour under test is reached. Mark the module POSIX-only.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Alexandre Teixeira <general@alexandreteixeira.dev>
This commit is contained in:
indieindie7
2026-11-01 08:33:08 +00:00
committed by GitHub
co-authored by Claude Fable 5.1 Alexandre Teixeira
parent 6fced41220
commit c4fdd7ad5b
+7
View File
@@ -8,6 +8,13 @@ from pathlib import Path
import pytest import pytest
import yaml import yaml
# The migration runs inside the searxng container entrypoint and preserves the
# settings file's owner/mode with os.fchmod/os.fchown, which do not exist on
# Windows, so every subprocess run of the script fails there before it starts.
pytestmark = pytest.mark.skipif(
os.name == "nt", reason="POSIX-only: migrate_searxng_settings.py uses os.fchmod/os.fchown"
)
ROOT = Path(__file__).resolve().parent.parent ROOT = Path(__file__).resolve().parent.parent
MIGRATION = ROOT / "scripts" / "migrate_searxng_settings.py" MIGRATION = ROOT / "scripts" / "migrate_searxng_settings.py"