test: cover repo-root imports in execute_code sandbox
This commit is contained in:
parent
23bc642c82
commit
0614969f7b
1 changed files with 6 additions and 0 deletions
|
|
@ -129,6 +129,12 @@ class TestExecuteCode(unittest.TestCase):
|
||||||
self.assertIn("hello world", result["output"])
|
self.assertIn("hello world", result["output"])
|
||||||
self.assertEqual(result["tool_calls_made"], 0)
|
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):
|
def test_single_tool_call(self):
|
||||||
"""Script calls terminal and prints the result."""
|
"""Script calls terminal and prints the result."""
|
||||||
code = """
|
code = """
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue