From 61ea3ed3c4365aeaf0a57ccf4130110d77fdc8fa Mon Sep 17 00:00:00 2001 From: Xubin Ren <52506698+Re-bin@users.noreply.github.com> Date: Wed, 9 Sep 2026 23:43:14 +0800 Subject: [PATCH] test(exec): keep Seatbelt identity fixtures portable on Windows --- tests/tools/test_sandbox.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/tools/test_sandbox.py b/tests/tools/test_sandbox.py index 3865b1701..69f32f986 100644 --- a/tests/tools/test_sandbox.py +++ b/tests/tools/test_sandbox.py @@ -428,7 +428,9 @@ class TestSeatbeltBackend: @pytest.mark.parametrize("same_directory", [True, False]) def test_rw_coverage_uses_filesystem_identity(self, tmp_path, monkeypatch, same_directory): ro = tmp_path / "Tree" / "ReadOnly" - rw = tmp_path / "tree" + # Keep the lexical paths distinct even on Windows; this test controls + # filesystem identity, while native tests cover volume case sensitivity. + rw = tmp_path / "aliased-tree" monkeypatch.setattr( Path, "samefile", lambda path, other: same_directory and path == ro.parent and other == rw, @@ -437,7 +439,7 @@ class TestSeatbeltBackend: def test_missing_rw_alias_does_not_unlock_readonly_root(self, tmp_path): ro = tmp_path / "missing" / "readonly" - assert not _seatbelt_is_within(ro, tmp_path / "MISSING") + assert not _seatbelt_is_within(ro, tmp_path / "missing-alias") assert _seatbelt_is_within(ro, ro.parent) def test_custom_read_write_binds(self, tmp_path):