Test write_bytes writes bytes to file.
(self)
| 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 | |
| 254 | class TestAsyncPathDirectoryOperations: |
nothing calls this directly
no test coverage detected