(self)
| 37 | self.data = None |
| 38 | |
| 39 | def test_roundtrip(self): |
| 40 | # Write data to file |
| 41 | fp = memmap(self.tmpfp, dtype=self.dtype, mode='w+', |
| 42 | shape=self.shape) |
| 43 | fp[:] = self.data[:] |
| 44 | del fp # Test __del__ machinery, which handles cleanup |
| 45 | |
| 46 | # Read data back from file |
| 47 | newfp = memmap(self.tmpfp, dtype=self.dtype, mode='r', |
| 48 | shape=self.shape) |
| 49 | assert_(allclose(self.data, newfp)) |
| 50 | assert_array_equal(self.data, newfp) |
| 51 | assert_equal(newfp.flags.writeable, False) |
| 52 | |
| 53 | def test_open_with_filename(self, tmp_path): |
| 54 | tmpname = tmp_path / 'mmap' |
nothing calls this directly
no test coverage detected