(fs, pathfn)
| 1039 | |
| 1040 | |
| 1041 | def test_open_input_file(fs, pathfn): |
| 1042 | p = pathfn('open-input-file') |
| 1043 | |
| 1044 | data = b'some data' * 1024 |
| 1045 | with fs.open_output_stream(p) as s: |
| 1046 | s.write(data) |
| 1047 | |
| 1048 | read_from = len(b'some data') * 512 |
| 1049 | with fs.open_input_file(p) as f: |
| 1050 | result = f.read() |
| 1051 | assert result == data |
| 1052 | |
| 1053 | with fs.open_input_file(p) as f: |
| 1054 | f.seek(read_from) |
| 1055 | result = f.read() |
| 1056 | |
| 1057 | assert result == data[read_from:] |
| 1058 | |
| 1059 | |
| 1060 | def test_open_input_stream_not_found(fs, pathfn): |
nothing calls this directly
no test coverage detected