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

Function test_stateful

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

Source from the content-addressed store, hash-verified

2
3
4def test_stateful():
5 with CodeInterpreter() as sandbox:
6 sandbox.notebook.exec_cell("x = 1")
7
8 result = sandbox.notebook.exec_cell("x+=1; x")
9 assert result.output == "2"

Callers

nothing calls this directly

Calls 2

CodeInterpreterClass · 0.90
exec_cellMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…