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

Function test_write

packages/python-sdk/tests/test_controls.py:76–85  ·  view source on GitHub ↗
(sandbox: Sandbox)

Source from the content-addressed store, hash-verified

74
75
76def test_write(sandbox: Sandbox):
77 # Create a file and open it in a text editor
78 text_file_path = "/home/user/test.txt"
79 sandbox.files.write(text_file_path, "hello")
80 sandbox.open(text_file_path)
81 # Add an assertion here, perhaps check if the content is correct
82 content = sandbox.files.read(text_file_path)
83 assert content == "hello", (
84 f"Expected content 'hello' in {text_file_path}, but got {content}"
85 )

Callers

nothing calls this directly

Calls 2

writeMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected