()
| 205 | |
| 206 | |
| 207 | def test_python_file_readinto(): |
| 208 | length = 10 |
| 209 | data = b'some sample data longer than 10' |
| 210 | dst_buf = bytearray(length) |
| 211 | src_buf = BytesIO(data) |
| 212 | |
| 213 | with pa.PythonFile(src_buf, mode='r') as f: |
| 214 | assert f.readinto(dst_buf) == 10 |
| 215 | |
| 216 | assert dst_buf[:length] == data[:length] |
| 217 | assert len(dst_buf) == length |
| 218 | |
| 219 | |
| 220 | def test_python_file_read_buffer(): |
nothing calls this directly
no test coverage detected