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

Function test_independence_of_kernels

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

Source from the content-addressed store, hash-verified

7
8
9def test_independence_of_kernels():
10 with CodeInterpreter() as sandbox:
11 kernel_id = sandbox.notebook.create_kernel()
12 sandbox.notebook.exec_cell("x = 1")
13
14 r = sandbox.notebook.exec_cell("x", kernel_id=kernel_id)
15 assert r.error.value == "name 'x' is not defined"
16
17
18def test_restart_kernel():

Callers

nothing calls this directly

Calls 3

CodeInterpreterClass · 0.90
create_kernelMethod · 0.80
exec_cellMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…