From 7192552624a089e73162a94e1c68d6c7c0da3d93 Mon Sep 17 00:00:00 2001 From: Igor Lins e Silva <4753812+igorls@users.noreply.github.com> Date: Mon, 13 Apr 2026 18:55:26 -0300 Subject: [PATCH] test: make diary state path assertion platform-neutral MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Windows CI job failed on: assert '/.mempalace/state/' in str(state_path) because Windows uses ``\`` as the path separator, so the substring never matches. The behavior under test (state file lives outside the diary dir, under ``~/.mempalace/state/``) is already correct on both platforms — only the assertion was Unix-only. Switch to ``state_path.parent`` comparisons that work on any OS. --- tests/test_closets.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_closets.py b/tests/test_closets.py index 59321c5..458f767 100644 --- a/tests/test_closets.py +++ b/tests/test_closets.py @@ -586,7 +586,10 @@ class TestDiaryIngest: # State file does exist under ~/.mempalace/state/. state_path = _state_file_for(str(palace_dir), diary_dir.resolve()) assert state_path.exists() - assert "/.mempalace/state/" in str(state_path) + # Platform-neutral path check: compare parents rather than a hardcoded + # separator string that would fail on Windows (``\.mempalace\state\``). + assert state_path.parent.name == "state" + assert state_path.parent.parent.name == ".mempalace" def test_wing_prefixed_drawer_id_prevents_cross_diary_collision(self, tmp_path): # Regression: the original implementation used