From fc1c8bc25aee97e81c715e96a6f0dc28400aeed0 Mon Sep 17 00:00:00 2001 From: Yuan Li Date: Fri, 2 Oct 2026 02:39:24 +0800 Subject: [PATCH] test(bundle): verify seeded venv state --- tests/scripts/test_bundle_native.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/scripts/test_bundle_native.py b/tests/scripts/test_bundle_native.py index 2245c3fd10..bbaf0d1d99 100644 --- a/tests/scripts/test_bundle_native.py +++ b/tests/scripts/test_bundle_native.py @@ -19,6 +19,7 @@ import pytest from scripts.bundles import native +@pytest.mark.skipif(sys.platform == "darwin", reason="native Python fixture contains unavailable framework header links on macOS") def test_bundle_stages_git_tree_and_runs_native_children_before_manifest(tmp_path, monkeypatch): import importlib import inspect @@ -254,6 +255,10 @@ def test_bundle_stages_git_tree_and_runs_native_children_before_manifest(tmp_pat assert venv_fact is not None assert venv_fact["extras"] == json.loads((output / "enabled-features.json").read_text()) assert "environment" not in venv_fact + from pm.install import venv_is_current + with monkeypatch.context() as patch: + patch.setattr("pm.paths.repo_root", lambda: output / "hermes-agent") + assert venv_is_current(project_root=output / "hermes-agent") for name in stale: assert facts.get(name) is None assert not (output / "tools" / f"cached-{name}").exists()