fix(tests): isolate tests from user ~/.hermes/ config and SOUL.md
_make_cli() now patches CLI_CONFIG with clean defaults so test_cli_init tests don't depend on the developer's local config.yaml. test_empty_dir_returns_empty now mocks Path.home() so it doesn't pick up a global SOUL.md. Credit to teyrebaz33 for identifying and fixing these in PR #557. Fixes #555.
This commit is contained in:
parent
6cd3bc6640
commit
2a68099675
2 changed files with 19 additions and 2 deletions
|
|
@ -172,7 +172,11 @@ class TestBuildSkillsSystemPrompt:
|
|||
|
||||
class TestBuildContextFilesPrompt:
|
||||
def test_empty_dir_returns_empty(self, tmp_path):
|
||||
result = build_context_files_prompt(cwd=str(tmp_path))
|
||||
from unittest.mock import patch
|
||||
fake_home = tmp_path / "fake_home"
|
||||
fake_home.mkdir()
|
||||
with patch("pathlib.Path.home", return_value=fake_home):
|
||||
result = build_context_files_prompt(cwd=str(tmp_path))
|
||||
assert result == ""
|
||||
|
||||
def test_loads_agents_md(self, tmp_path):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue