mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-23 05:31:23 +00:00
fix(install): skip browser download when system chromium exists
This commit is contained in:
parent
7f08cb5941
commit
52521c937a
4 changed files with 173 additions and 54 deletions
|
|
@ -41,6 +41,16 @@ class TestChromiumSearchRoots:
|
|||
|
||||
|
||||
class TestChromiumInstalled:
|
||||
def test_true_when_plain_chromium_on_path(self, monkeypatch):
|
||||
monkeypatch.delenv("AGENT_BROWSER_EXECUTABLE_PATH", raising=False)
|
||||
monkeypatch.setattr(
|
||||
bt.shutil,
|
||||
"which",
|
||||
lambda name: "/usr/bin/chromium" if name == "chromium" else None,
|
||||
)
|
||||
|
||||
assert bt._chromium_installed() is True
|
||||
|
||||
def test_true_when_chromium_dir_present(self, monkeypatch, tmp_path):
|
||||
monkeypatch.setenv("PLAYWRIGHT_BROWSERS_PATH", str(tmp_path))
|
||||
(tmp_path / "chromium-1208").mkdir()
|
||||
|
|
@ -108,4 +118,3 @@ class TestRunBrowserCommandChromiumGuard:
|
|||
"""
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue