Merge pull request #1383 from NousResearch/hermes/hermes-7ef7cb6a

fix: add project root to PYTHONPATH in execute_code sandbox
This commit is contained in:
Teknium 2026-03-14 21:41:50 -07:00 committed by GitHub
commit f9a61a0d9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 157 additions and 0 deletions

View file

@ -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 = """