MCPcopy Index your code
hub / github.com/e2b-dev/code-interpreter / test_restart_kernel

Function test_restart_kernel

python/tests/test_kernels.py:18–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17
18def test_restart_kernel():
19 with CodeInterpreter() as sandbox:
20 sandbox.notebook.exec_cell("x = 1")
21 sandbox.notebook.restart_kernel()
22
23 r = sandbox.notebook.exec_cell("x")
24 assert r.error.value == "name 'x' is not defined"
25
26
27def test_list_kernels():

Callers

nothing calls this directly

Calls 3

CodeInterpreterClass · 0.90
exec_cellMethod · 0.80
restart_kernelMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…