mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
refactor: DRY cleanup from code review
- dep_ensure.py: use get_hermes_home() instead of hand-rolled env var - dep_ensure.py: add "chrome" to browser name list (was inconsistent with browser_tool.py) - main.py _cmd_update_check: use detect_install_method() directly instead of redundant .git check - main.py _cmd_update_pip: build command list directly instead of fragile split() on display string - banner.py: rename _check_via_pypi → check_via_pypi (cross-module public API)
This commit is contained in:
parent
164a77dec9
commit
47c0efe1c0
5 changed files with 39 additions and 36 deletions
|
|
@ -70,7 +70,7 @@ def test_check_for_updates_no_git_dir(tmp_path, monkeypatch):
|
|||
monkeypatch.setattr(banner, "__file__", str(fake_banner))
|
||||
monkeypatch.setenv("HERMES_HOME", str(tmp_path))
|
||||
with patch("hermes_cli.banner.subprocess.run") as mock_run:
|
||||
with patch("hermes_cli.banner._check_via_pypi", return_value=0):
|
||||
with patch("hermes_cli.banner.check_via_pypi", return_value=0):
|
||||
result = banner.check_for_updates()
|
||||
assert result == 0
|
||||
mock_run.assert_not_called()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue