CallOptions

This commit is contained in:
lda
2026-08-30 03:39:26 +07:00 Verified
parent 2587b07b4a
commit 282dc5b4e8
8 changed files with 59 additions and 65 deletions
+12 -5
View File
@@ -39,7 +39,9 @@ class ShellTests(unittest.TestCase):
def test_init_shell_has_no_seed_escape_hatch(self):
import inspect
self.assertNotIn("seed", inspect.signature(shell_module.Shell.init_shell).parameters)
self.assertNotIn(
"seed", inspect.signature(shell_module.Shell.init_shell).parameters
)
def test_package_import_has_no_experiment_side_effects(self):
env = os.environ.copy()
@@ -66,9 +68,12 @@ class ShellTests(unittest.TestCase):
sequence=4,
)
self.assertEqual(stdout, models_module.CallEvent(
call_id="call-1", sequence=3, kind="stdout", text="hello\n"
))
self.assertEqual(
stdout,
models_module.CallEvent(
call_id="call-1", sequence=3, kind="stdout", text="hello\n"
),
)
self.assertEqual(result.data, {"text/plain": "42"})
def test_run_cell_and_collect_returns_execution_and_events(self):
@@ -159,7 +164,9 @@ class ShellTests(unittest.TestCase):
wrapper.init_shell()
def fail_capture_output(*args, **kwargs):
raise AssertionError("Shell.run_cell must use the shell-local output records")
raise AssertionError(
"Shell.run_cell must use the shell-local output records"
)
with patch.object(
capture,