MCPcopy
hub / github.com/marimo-team/marimo / test_write_text

Method test_write_text

tests/_utils/test_async_path.py:225–232  ·  view source on GitHub ↗

Test write_text writes string to file.

(self)

Source from the content-addressed store, hash-verified

223 os.unlink(tmp.name)
224
225 async def test_write_text(self):
226 """Test write_text writes string to file."""
227 with tempfile.TemporaryDirectory() as tmp:
228 path = AsyncPath(tmp) / "test.txt"
229 bytes_written = await path.write_text("test content")
230 assert bytes_written > 0
231 content = await path.read_text()
232 assert content == "test content"
233
234 async def test_write_text_with_encoding(self):
235 """Test write_text with specific encoding."""

Callers

nothing calls this directly

Calls 3

AsyncPathClass · 0.90
write_textMethod · 0.45
read_textMethod · 0.45

Tested by

no test coverage detected