CallOptions
This commit is contained in:
+12
-5
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user