(self, tmp_path, param_filename)
| 6199 | assert_array_equal(x, y) |
| 6200 | |
| 6201 | def test_unseekable_fromfile(self, tmp_path, param_filename): |
| 6202 | # gh-6246 |
| 6203 | tmp_filename = normalize_filename(tmp_path, param_filename) |
| 6204 | x = self._create_data() |
| 6205 | x.tofile(tmp_filename) |
| 6206 | |
| 6207 | def fail(*args, **kwargs): |
| 6208 | raise OSError('Can not tell or seek') |
| 6209 | |
| 6210 | with open(tmp_filename, 'rb', buffering=0) as f: |
| 6211 | f.seek = fail |
| 6212 | f.tell = fail |
| 6213 | assert_raises(OSError, np.fromfile, f, dtype=x.dtype) |
| 6214 | |
| 6215 | def test_io_open_unbuffered_fromfile(self, tmp_path, param_filename): |
| 6216 | # gh-6632 |
nothing calls this directly
no test coverage detected