MCPcopy Index your code
hub / github.com/marimo-team/marimo / test_write_bytes

Method test_write_bytes

tests/_utils/test_async_path.py:243–251  ·  view source on GitHub ↗

Test write_bytes writes bytes to file.

(self)

Source from the content-addressed store, hash-verified

241 assert read_content == content
242
243 async def test_write_bytes(self):
244 """Test write_bytes writes bytes to file."""
245 with tempfile.TemporaryDirectory() as tmp:
246 path = AsyncPath(tmp) / "test.bin"
247 data = b"test bytes"
248 bytes_written = await path.write_bytes(data)
249 assert bytes_written == len(data)
250 content = await path.read_bytes()
251 assert content == data
252
253
254class TestAsyncPathDirectoryOperations:

Callers

nothing calls this directly

Calls 3

AsyncPathClass · 0.90
write_bytesMethod · 0.45
read_bytesMethod · 0.45

Tested by

no test coverage detected