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

Method test_read_text

tests/_utils/test_async_path.py:193–201  ·  view source on GitHub ↗

Test read_text returns file contents as string.

(self)

Source from the content-addressed store, hash-verified

191
192class TestAsyncPathFileIO:
193 async def test_read_text(self):
194 """Test read_text returns file contents as string."""
195 with tempfile.NamedTemporaryFile(mode="w", delete=False) as tmp:
196 tmp.write("test content")
197 tmp.flush()
198 path = AsyncPath(tmp.name)
199 content = await path.read_text()
200 assert content == "test content"
201 os.unlink(tmp.name)
202
203 async def test_read_text_with_encoding(self):
204 """Test read_text with specific encoding."""

Callers

nothing calls this directly

Calls 5

read_textMethod · 0.95
AsyncPathClass · 0.90
unlinkMethod · 0.80
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected