mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-01 01:51:44 +00:00
Merge pull request #1383 from NousResearch/hermes/hermes-7ef7cb6a
fix: add project root to PYTHONPATH in execute_code sandbox
This commit is contained in:
commit
f9a61a0d9e
4 changed files with 157 additions and 0 deletions
|
|
@ -129,6 +129,12 @@ class TestExecuteCode(unittest.TestCase):
|
|||
self.assertIn("hello world", result["output"])
|
||||
self.assertEqual(result["tool_calls_made"], 0)
|
||||
|
||||
def test_repo_root_modules_are_importable(self):
|
||||
"""Sandboxed scripts can import modules that live at the repo root."""
|
||||
result = self._run('import minisweagent_path; print(minisweagent_path.__file__)')
|
||||
self.assertEqual(result["status"], "success")
|
||||
self.assertIn("minisweagent_path.py", result["output"])
|
||||
|
||||
def test_single_tool_call(self):
|
||||
"""Script calls terminal and prints the result."""
|
||||
code = """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue