Test write_text writes string to file.
(self)
| 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.""" |
nothing calls this directly
no test coverage detected