test: cover repo-root imports in execute_code sandbox

This commit is contained in:
teknium1
2026-03-14 21:41:12 -07:00
parent 23bc642c82
commit 0614969f7b

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