From e8cda55ddb0a45f71a9ebd4ee9c91a2fe4025ae1 Mon Sep 17 00:00:00 2001 From: phernandez Date: Mon, 8 Jun 2026 13:00:48 -0500 Subject: [PATCH] test(cli): make copyto path assertions Windows-portable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Windows SQLite unit job failed because two new copyto tests asserted on raw POSIX dest strings. On Windows `str(Path("/tmp/research"))` renders with backslashes, so the copyto dest is `\tmp\research/notes/...` (rclone accepts the mixed separators — the product is fine). Compare the local dest via `Path(...)` like the other tests, which normalizes separators cross-platform. Signed-off-by: phernandez --- tests/test_rclone_commands.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_rclone_commands.py b/tests/test_rclone_commands.py index 0b4253fe..a94d4f75 100644 --- a/tests/test_rclone_commands.py +++ b/tests/test_rclone_commands.py @@ -726,7 +726,9 @@ def test_project_copy_file_pull_copyto_renames_on_dest(tmp_path): cmd, _ = runner.calls[0] assert cmd[:2] == ["rclone", "copyto"] assert cmd[2] == "basic-memory-cloud:my-bucket/research/notes/dup.md" - assert cmd[3] == "/tmp/research/notes/dup.conflict-S.md" + # Compare the local dest via Path so the assertion holds on Windows, where the + # local root renders with backslashes (rclone accepts the mixed separators). + assert Path(cmd[3]) == Path("/tmp/research/notes/dup.conflict-S.md") # pull writes the conflict copy locally → must guard virtual-FS NUL padding assert "--local-no-preallocate" in cmd @@ -753,7 +755,8 @@ def test_project_transfer_keep_both_copies_conflicts_then_additive(tmp_path): # First a copyto for the conflict file, written beside the local copy... first_cmd, _ = runner.calls[0] assert first_cmd[:2] == ["rclone", "copyto"] - assert first_cmd[3] == "/tmp/research/dup.conflict-S.md" + # Path comparison so this holds on Windows (backslash local root). + assert Path(first_cmd[3]) == Path("/tmp/research/dup.conflict-S.md") # ...then an additive (new-only) copy that won't overwrite existing local files. second_cmd, _ = runner.calls[1] assert second_cmd[:2] == ["rclone", "copy"]