From b52046d209d97dabd6d747bb7c9983c95247d21c Mon Sep 17 00:00:00 2001 From: Research Assistant Date: Sat, 9 May 2026 18:33:42 +0800 Subject: [PATCH] fix: skip backslash path test on non-Windows (\\ is valid filename char on Linux) --- tests/unit/adapters/test_zotero_paths.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit/adapters/test_zotero_paths.py b/tests/unit/adapters/test_zotero_paths.py index 1f03d2a7..ced9108b 100644 --- a/tests/unit/adapters/test_zotero_paths.py +++ b/tests/unit/adapters/test_zotero_paths.py @@ -3,6 +3,8 @@ from __future__ import annotations from pathlib import Path from unittest.mock import patch +import pytest + from paperforge.adapters.zotero_paths import ( absolutize_vault_path, obsidian_wikilink_for_path, @@ -79,6 +81,10 @@ class TestAbsolutizeVaultPath: assert result == expected def test_relative_with_backslashes(self, tmp_path: Path) -> None: + """Backslash path separators are normalised. Only applies on Windows.""" + import sys + if sys.platform != "win32": + pytest.skip("Backslash-as-separator is Windows-only behaviour") vault = tmp_path / "vault" vault.mkdir() result = absolutize_vault_path(vault, "subdir\\file.pdf")