hermes-hub/tests/test_linux_port_paths.py
Hermes Team e42f262b6d feat(A15): веб-API, общий ActionExecutor и порт путей на Linux
Работа A15 выполнена, но не закоммичена: git в его окружении был
недоступен. Восстановлена ревьюером из рабочего каталога.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 19:45:13 +07:00

20 lines
836 B
Python

import os
import sys
import importlib
from pathlib import Path
def test_hermes_home_overrides_localappdata(monkeypatch, tmp_path):
monkeypatch.setenv('HERMES_HOME', str(tmp_path / 'custom_home'))
monkeypatch.setenv('LOCALAPPDATA', str(tmp_path / 'bad_localappdata'))
from antigravity_provider import paths
from antigravity_provider.router import model_discovery_service
assert str(paths.get_hermes_home()) == str(tmp_path / 'custom_home')
discovery = model_discovery_service.ModelDiscoveryService()
assert str(tmp_path / 'custom_home') in str(discovery._cache_path)
assert 'bad_localappdata' not in str(discovery._cache_path)
assert str(tmp_path / 'custom_home') in str(paths.get_router_profiles_path())
assert 'bad_localappdata' not in str(paths.get_router_profiles_path())