MCPcopy Create free account
hub / github.com/e2b-dev/desktop / sandbox

Function sandbox

packages/python-sdk/tests/conftest.py:12–26  ·  view source on GitHub ↗
(debug)

Source from the content-addressed store, hash-verified

10
11@pytest.fixture(scope="function")
12def sandbox(debug):
13 # Create a new sandbox instance for each test
14 sandbox = Sandbox.create(timeout=timeout)
15
16 try:
17 yield sandbox
18 finally:
19 # Ensure proper cleanup
20 try:
21 sandbox.kill()
22 except Exception as e:
23 if not debug:
24 logger.warning(
25 f"Failed to kill sandbox — this is expected if the test runs with local envd. Error: {e}"
26 )
27
28
29@pytest.fixture

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected