Skip to content

The agent that grows with you

test(bundle): check the seeded venv fact the way the bundled backend reads it

alt-glitch6c774fb7d11d
diff --git a/tests/scripts/test_bundle_native.py b/tests/scripts/test_bundle_native.py
index bbaf0d1d99f..e2d4acf1b98 100644
--- a/tests/scripts/test_bundle_native.py
+++ b/tests/scripts/test_bundle_native.py
@@ -19,7 +19,6 @@ import pytest
from scripts.bundles import native
[email protected](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
@@ -253,10 +252,12 @@ def test_bundle_stages_git_tree_and_runs_native_children_before_manifest(tmp_pat
facts = Facts(output / "tools/facts.json")
venv_fact = facts.get("venv")
assert venv_fact is not None
- assert venv_fact["extras"] == json.loads((output / "enabled-features.json").read_text())
+ assert venv_fact["extras"] == json.loads((output / "enabled-features.json").read_text())["extras"]
assert "environment" not in venv_fact
from pm.install import venv_is_current
with monkeypatch.context() as patch:
+ # The desktop app points the bundled backend's store at the payload's tools dir.
+ patch.setenv("HERMES_RUNTIME_DIR", str(output / "tools"))
patch.setattr("pm.paths.repo_root", lambda: output / "hermes-agent")
assert venv_is_current(project_root=output / "hermes-agent")
for name in stale: