From 5bfd322486072fda95a796ebdc9c832fb4ec1ce6 Mon Sep 17 00:00:00 2001 From: Ryan Adams Date: Thu, 12 Nov 2026 13:12:26 -0700 Subject: [PATCH] test: make build_paths state-dir assertion host-independent Problem: test_build_paths_uses_var_lib_for_manifest_state failed on macOS. Cause: build_paths() resolves its system roots, and /var is a symlink to /private/var on macOS, so the literal /var/lib path never matched. The product behavior is intentional and consistent; the expectation was host-specific. test_app_registry and test_client_side_timestamp_rendering do not read built assets or host paths and already pass from any cwd. Fix: compare against Path(...).resolve(), keeping the same three assertions. Verified: - test_manage_parseus_lib.py: all pass (was 1 failed) - test_app_registry + test_client_side_timestamp_rendering: 14 passed from /tmp cwd - full suite: only Elasticsearch-server failures remain Co-Authored-By: Claude Sonnet 5.5 --- tests/test_manage_parseus_lib.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_manage_parseus_lib.py b/tests/test_manage_parseus_lib.py index 88ce039..716820b 100644 --- a/tests/test_manage_parseus_lib.py +++ b/tests/test_manage_parseus_lib.py @@ -660,9 +660,11 @@ def test_remove_system_accounts_uses_manifest_created_flags(monkeypatch) -> None def test_build_paths_uses_var_lib_for_manifest_state() -> None: paths = build_paths() - assert paths.state_dir == Path("/var/lib/parseus/state") - assert paths.current_manifest == Path("/var/lib/parseus/state/current_manifest.json") - assert paths.history_dir == Path("/var/lib/parseus/state/history") + # build_paths() resolves symlinks, so /var -> /private/var on macOS. + state = Path("/var/lib/parseus/state").resolve() + assert paths.state_dir == state + assert paths.current_manifest == state / "current_manifest.json" + assert paths.history_dir == state / "history" def _test_install_paths(tmp_path: Path):